diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2013-02-08 01:57:48 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-02-22 07:31:36 -0500 |
commit | 61e1b269be20f2bd81d0e6a2ccdc42eca3a6f059 (patch) | |
tree | 2a66ac61225f309d0c96849860e40914c41cea70 /drivers/scsi/qla2xxx/qla_init.c | |
parent | e9454a883b3a26a63c3810f8e4f33c71e218728c (diff) |
[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.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index bbf5688885f1..97f268433b9f 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) | |||
2207 | char connect_type[22]; | 2207 | char connect_type[22]; |
2208 | struct qla_hw_data *ha = vha->hw; | 2208 | struct qla_hw_data *ha = vha->hw; |
2209 | unsigned long flags; | 2209 | unsigned long flags; |
2210 | scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); | ||
2210 | 2211 | ||
2211 | /* Get host addresses. */ | 2212 | /* Get host addresses. */ |
2212 | rval = qla2x00_get_adapter_id(vha, | 2213 | rval = qla2x00_get_adapter_id(vha, |
@@ -2220,6 +2221,13 @@ qla2x00_configure_hba(scsi_qla_host_t *vha) | |||
2220 | } else { | 2221 | } else { |
2221 | ql_log(ql_log_warn, vha, 0x2009, | 2222 | ql_log(ql_log_warn, vha, 0x2009, |
2222 | "Unable to get host loop ID.\n"); | 2223 | "Unable to get host loop ID.\n"); |
2224 | if (IS_FWI2_CAPABLE(ha) && (vha == base_vha) && | ||
2225 | (rval == QLA_COMMAND_ERROR && loop_id == 0x1b)) { | ||
2226 | ql_log(ql_log_warn, vha, 0x1151, | ||
2227 | "Doing link init.\n"); | ||
2228 | if (qla24xx_link_initialize(vha) == QLA_SUCCESS) | ||
2229 | return rval; | ||
2230 | } | ||
2223 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 2231 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
2224 | } | 2232 | } |
2225 | return (rval); | 2233 | return (rval); |