Skip to content

Commit 1cbc0ef

Browse files
Darren Trappmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix retry for PRLI RJT with reason of BUSY
Signed-off-by: Darren Trapp <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 2e4c5d2 commit 1cbc0ef

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* | | | 0xb13c-0xb140 |
6161
* | | | 0xb149 |
6262
* | MultiQ | 0xc010 | |
63-
* | Misc | 0xd302 | 0xd031-0xd0ff |
63+
* | Misc | 0xd303 | 0xd031-0xd0ff |
6464
* | | | 0xd101-0xd1fe |
6565
* | | | 0xd214-0xd2fe |
6666
* | Target Mode | 0xe081 | |

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport)
880880
return rval;
881881

882882
if (fcport->fw_login_state == DSC_LS_PLOGI_PEND ||
883-
fcport->fw_login_state == DSC_LS_PLOGI_COMP ||
884883
fcport->fw_login_state == DSC_LS_PRLI_PEND)
885884
return rval;
886885

@@ -1238,6 +1237,11 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
12381237
qla2x00_post_async_adisc_work(vha, fcport, data);
12391238
break;
12401239

1240+
case DSC_LOGIN_PEND:
1241+
if (fcport->fw_login_state == DSC_LS_PLOGI_COMP)
1242+
qla24xx_post_prli_work(vha, fcport);
1243+
break;
1244+
12411245
default:
12421246
break;
12431247
}
@@ -1640,6 +1644,13 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
16401644
qla24xx_post_gpdb_work(vha, ea->fcport, 0);
16411645
break;
16421646
default:
1647+
if ((ea->iop[0] == LSC_SCODE_ELS_REJECT) &&
1648+
(ea->iop[1] == 0x50000)) { /* reson 5=busy expl:0x0 */
1649+
set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
1650+
ea->fcport->fw_login_state = DSC_LS_PLOGI_COMP;
1651+
break;
1652+
}
1653+
16431654
if (ea->fcport->n2n_flag) {
16441655
ql_dbg(ql_dbg_disc, vha, 0x2118,
16451656
"%s %d %8phC post fc4 prli\n",

drivers/scsi/qla2xxx/qla_mbx.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,9 +1025,12 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha)
10251025
* FW supports nvme and driver load parameter requested nvme.
10261026
* BIT 26 of fw_attributes indicates NVMe support.
10271027
*/
1028-
if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable)
1028+
if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable) {
10291029
vha->flags.nvme_enabled = 1;
1030-
1030+
ql_log(ql_log_info, vha, 0xd302,
1031+
"%s: FC-NVMe is Enabled (0x%x)\n",
1032+
__func__, ha->fw_attributes_h);
1033+
}
10311034
}
10321035

10331036
if (IS_QLA27XX(ha)) {

0 commit comments

Comments
 (0)