diff mbox series

[05/10] qla2xxx: Error code did not return to upper layer

Message ID 20230801114057.27039-6-njavali@marvell.com (mailing list archive)
State Superseded
Headers show
Series qla2xxx driver misc features | expand

Commit Message

Nilesh Javali Aug. 1, 2023, 11:40 a.m. UTC
From: Quinn Tran <qutran@marvell.com>

TMF was returned with an error code. The error code was not
preserved to be returned to upper layer. Instead, the error code
from the Marker was returned.

Preserve error code from TMF and return it to upper layer.

Cc: stable@vger.kernel.org
Fixes: da7c21b72aa8 ("scsi: qla2xxx: Fix command flush during TMF")
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Himanshu Madhani Aug. 2, 2023, 7:53 p.m. UTC | #1
On 8/1/23 04:40, Nilesh Javali wrote:
> From: Quinn Tran <qutran@marvell.com>
> 
> TMF was returned with an error code. The error code was not
> preserved to be returned to upper layer. Instead, the error code
> from the Marker was returned.
> 
> Preserve error code from TMF and return it to upper layer.
> 
> Cc: stable@vger.kernel.org
> Fixes: da7c21b72aa8 ("scsi: qla2xxx: Fix command flush during TMF")
> Signed-off-by: Quinn Tran <qutran@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
>   drivers/scsi/qla2xxx/qla_init.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 7faf2109228e..3ab90c159034 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -2223,6 +2223,8 @@ __qla2x00_async_tm_cmd(struct tmf_arg *arg)
>   			rval = QLA_FUNCTION_FAILED;
>   		}
>   	}
> +	if (tm_iocb->u.tmf.data)
> +		rval = tm_iocb->u.tmf.data;
>   
>   done_free_sp:
>   	/* ref: INIT */

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 7faf2109228e..3ab90c159034 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2223,6 +2223,8 @@  __qla2x00_async_tm_cmd(struct tmf_arg *arg)
 			rval = QLA_FUNCTION_FAILED;
 		}
 	}
+	if (tm_iocb->u.tmf.data)
+		rval = tm_iocb->u.tmf.data;
 
 done_free_sp:
 	/* ref: INIT */