summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_gs.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-12-28 12:33:33 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-03 23:41:07 -0500
commitcf055fb0b709d56da122a498a141212b511dad80 (patch)
treef558dadf127ee09c170d9e4f0327f758ec75e155 /drivers/scsi/qla2xxx/qla_gs.c
parentfb35265b12bb9ba4946e146e0c7090a446a9b081 (diff)
downloadlinux-cf055fb0b709d56da122a498a141212b511dad80.tar.bz2
scsi: qla2xxx: Fix GPNFT/GNNFT error handling
retry gpnft/gnnft if error is encountered. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gs.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index a530c777eac9..fff12d770583 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3878,6 +3878,7 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
ql_dbg(ql_dbg_disc, vha, 0xffff,
"GPNFT failed. FC4type %x. Rescanning.\n",
fc4type);
+ set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
goto out;
}
@@ -3987,6 +3988,19 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res)
"Async done-%s res %x FC4Type %x\n",
sp->name, res, sp->gen2);
+ if (res) {
+ unsigned long flags;
+
+ ql_dbg(ql_dbg_disc, sp->vha, 0xffff,
+ "Async done-%s timed out.\n",
+ sp->name);
+ sp->free(sp);
+ set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
+ set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
+ qla2xxx_wake_dpc(vha);
+ return;
+ }
+
if (!res) {
port_id_t id;
u64 wwn;
@@ -4048,6 +4062,7 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res)
"Async done-%s unable to alloc work element\n",
sp->name);
sp->free(sp);
+ set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
return;
}