summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2013-02-08 06:57:48 (GMT)
committerJames Bottomley <JBottomley@Parallels.com>2013-02-22 12:31:36 (GMT)
commit61e1b269be20f2bd81d0e6a2ccdc42eca3a6f059 (patch)
tree2a66ac61225f309d0c96849860e40914c41cea70 /drivers/scsi/qla2xxx/qla_init.c
parente9454a883b3a26a63c3810f8e4f33c71e218728c (diff)
downloadlinux-fsl-qoriq-61e1b269be20f2bd81d0e6a2ccdc42eca3a6f059.tar.xz
[SCSI] qla2xxx: Do link initialization on get loop id failure.
To avoid continually doing ISP resets when get loop id fails to obtain the adapter loop id, first try to do a link initialization. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index bbf5688..97f2684 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2207,6 +2207,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
char connect_type[22];
struct qla_hw_data *ha = vha->hw;
unsigned long flags;
+ scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
/* Get host addresses. */
rval = qla2x00_get_adapter_id(vha,
@@ -2220,6 +2221,13 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
} else {
ql_log(ql_log_warn, vha, 0x2009,
"Unable to get host loop ID.\n");
+ if (IS_FWI2_CAPABLE(ha) && (vha == base_vha) &&
+ (rval == QLA_COMMAND_ERROR && loop_id == 0x1b)) {
+ ql_log(ql_log_warn, vha, 0x1151,
+ "Doing link init.\n");
+ if (qla24xx_link_initialize(vha) == QLA_SUCCESS)
+ return rval;
+ }
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
}
return (rval);