summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2012-09-20 07:35:05 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-24 12:37:48 +0400
commit39c95826018ed68216cb34a1f6eb8c6b302a24f4 (patch)
treeb1681d86e110a49694d831020b668cfea4cfcf14 /drivers/scsi/qla4xxx/ql4_os.c
parent8276190725aca00bcf8869493a5040d2eebbca31 (diff)
downloadop-kernel-dev-39c95826018ed68216cb34a1f6eb8c6b302a24f4.zip
op-kernel-dev-39c95826018ed68216cb34a1f6eb8c6b302a24f4.tar.gz
[SCSI] qla4xxx: Update idc reg in case of PCI AER
Camram is reset by FW to default values after reboot/cold boot/pci reset. In case of AER, PCI may need to reset so we need to set correct idc reg value after PCIE error. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index afaba52..81b3038 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -6135,9 +6135,19 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
ha->isp_ops->idc_lock(ha);
qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
QLA8XXX_DEV_COLD);
- qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION,
- QLA82XX_IDC_VERSION);
ha->isp_ops->idc_unlock(ha);
+
+ rval = qla4_8xxx_update_idc_reg(ha);
+ if (rval == QLA_ERROR) {
+ ql4_printk(KERN_INFO, ha, "scsi%ld: %s: HW State: FAILED\n",
+ ha->host_no, __func__);
+ ha->isp_ops->idc_lock(ha);
+ qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
+ QLA8XXX_DEV_FAILED);
+ ha->isp_ops->idc_unlock(ha);
+ goto exit_error_recovery;
+ }
+
clear_bit(AF_FW_RECOVERY, &ha->flags);
rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER);
@@ -6195,6 +6205,7 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
ha->isp_ops->idc_unlock(ha);
}
}
+exit_error_recovery:
clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags);
return rval;
}
OpenPOWER on IntegriCloud