diff mbox series

[13/15] qla2xxx: If fcport is undergoing deletion return IO with retry

Message ID 20201201082730.24158-14-njavali@marvell.com (mailing list archive)
State Superseded
Headers show
Series qla2xxx bug fixes | expand

Commit Message

Nilesh Javali Dec. 1, 2020, 8:27 a.m. UTC
From: Saurav Kashyap <skashyap@marvell.com>

Driver unload with IOs causes server to crash.
Return IO with retry if fcport undergoing deletion.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Himanshu Madhani Dec. 1, 2020, 4:21 p.m. UTC | #1
> On Dec 1, 2020, at 2:27 AM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Saurav Kashyap <skashyap@marvell.com>
> 
> Driver unload with IOs causes server to crash.
> Return IO with retry if fcport undergoing deletion.
> 

Any call stack or panic signature to share in commit message?

> Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_os.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index a75edba2b334..be9d10092dd3 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -884,8 +884,8 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
> 			goto qc24_fail_command;
> 	}
> 
> -	if (!fcport) {
> -		cmd->result = DID_NO_CONNECT << 16;
> +	if (!fcport || fcport->deleted) {
> +		cmd->result = DID_IMM_RETRY << 16;
> 		goto qc24_fail_command;
> 	}
> 
> @@ -966,8 +966,8 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
> 		goto qc24_fail_command;
> 	}
> 
> -	if (!fcport) {
> -		cmd->result = DID_NO_CONNECT << 16;
> +	if (!fcport || fcport->deleted) {
> +		cmd->result = DID_IMM_RETRY << 16;
> 		goto qc24_fail_command;
> 	}
> 
> -- 
> 2.19.0.rc0
> 

Patch itself looks good.

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

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a75edba2b334..be9d10092dd3 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -884,8 +884,8 @@  qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
 			goto qc24_fail_command;
 	}
 
-	if (!fcport) {
-		cmd->result = DID_NO_CONNECT << 16;
+	if (!fcport || fcport->deleted) {
+		cmd->result = DID_IMM_RETRY << 16;
 		goto qc24_fail_command;
 	}
 
@@ -966,8 +966,8 @@  qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
 		goto qc24_fail_command;
 	}
 
-	if (!fcport) {
-		cmd->result = DID_NO_CONNECT << 16;
+	if (!fcport || fcport->deleted) {
+		cmd->result = DID_IMM_RETRY << 16;
 		goto qc24_fail_command;
 	}