summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorHimanshu Madhani <himanshu.madhani@qlogic.com>2014-09-25 05:17:00 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-25 14:25:05 +0200
commit2486c62765d73ad8f206ba43b8ede09e689bd803 (patch)
tree727ad8284c4286ff1fe2329dd91053d25560c08f /drivers/scsi/qla2xxx/qla_isr.c
parente05fe2924892a6c3c23dc818e94ce80dbceb86b1 (diff)
downloadop-kernel-dev-2486c62765d73ad8f206ba43b8ede09e689bd803.zip
op-kernel-dev-2486c62765d73ad8f206ba43b8ede09e689bd803.tar.gz
qla2xxx: Restore WWPN in case of Loop Dead.
For FA-WWPN capable device, ISP2031 and ISP27XX, when loop dead is detected by a driver, restore WWPN from NVRAM. Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index f15f87e..696e4a2 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -752,6 +752,16 @@ skip_rio:
if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
atomic_set(&vha->loop_state, LOOP_DOWN);
atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
+ /*
+ * In case of loop down, restore WWPN from
+ * NVRAM in case of FA-WWPN capable ISP
+ */
+ if (ha->flags.fawwpn_enabled) {
+ void *wwpn = ha->init_cb->port_name;
+
+ memcpy(vha->port_name, wwpn, WWN_SIZE);
+ }
+
vha->device_flags |= DFLG_NO_CABLE;
qla2x00_mark_all_devices_lost(vha, 1);
}
OpenPOWER on IntegriCloud