diff mbox series

[v2,04/11] qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds

Message ID 20240710171057.35066-5-njavali@marvell.com (mailing list archive)
State Accepted
Headers show
Series qla2xxx misc. bug fixes | expand

Commit Message

Nilesh Javali July 10, 2024, 5:10 p.m. UTC
From: Saurav Kashyap <skashyap@marvell.com>

Firmware only supports single DSDs in ELS Pass-through IOCB
(0x53h), sg cnt is decided by the SCSI ML. User is not aware of
the cause of an acutal error.

Return the appropriate return code that will be decoded by
API and application and proper error message will be displayed
to user.

Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.")
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_bsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Himanshu Madhani July 10, 2024, 7:33 p.m. UTC | #1
On 7/10/24 10:10 AM, Nilesh Javali wrote:
> From: Saurav Kashyap <skashyap@marvell.com>
> 
> Firmware only supports single DSDs in ELS Pass-through IOCB
> (0x53h), sg cnt is decided by the SCSI ML. User is not aware of
> the cause of an acutal error.
> 
> Return the appropriate return code that will be decoded by
> API and application and proper error message will be displayed
> to user.
> 
> Fixes: 6e98016ca077 ("[SCSI] qla2xxx: Re-organized BSG interface specific code.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
>   drivers/scsi/qla2xxx/qla_bsg.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
> index 19bb64bdd88b..8d1e45b883cd 100644
> --- a/drivers/scsi/qla2xxx/qla_bsg.c
> +++ b/drivers/scsi/qla2xxx/qla_bsg.c
> @@ -324,7 +324,7 @@ qla2x00_process_els(struct bsg_job *bsg_job)
>   		    "request_sg_cnt=%x reply_sg_cnt=%x.\n",
>   		    bsg_job->request_payload.sg_cnt,
>   		    bsg_job->reply_payload.sg_cnt);
> -		rval = -EPERM;
> +		rval = -ENOBUFS;
>   		goto done;
>   	}
>   

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

Patch

diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 19bb64bdd88b..8d1e45b883cd 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -324,7 +324,7 @@  qla2x00_process_els(struct bsg_job *bsg_job)
 		    "request_sg_cnt=%x reply_sg_cnt=%x.\n",
 		    bsg_job->request_payload.sg_cnt,
 		    bsg_job->reply_payload.sg_cnt);
-		rval = -EPERM;
+		rval = -ENOBUFS;
 		goto done;
 	}