aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
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 04:37:48 -0400
commit39c95826018ed68216cb34a1f6eb8c6b302a24f4 (patch)
treeb1681d86e110a49694d831020b668cfea4cfcf14 /drivers/scsi/qla4xxx
parent8276190725aca00bcf8869493a5040d2eebbca31 (diff)
[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')
-rw-r--r--drivers/scsi/qla4xxx/ql4_glbl.h1
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c2
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c15
3 files changed, 15 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index eea04e011a48..0580f8048f63 100644
--- a/drivers/scsi/qla4xxx/ql4_glbl.h
+++ b/drivers/scsi/qla4xxx/ql4_glbl.h
@@ -256,6 +256,7 @@ void qla4_8xxx_get_minidump(struct scsi_qla_host *ha);
256int qla4_8xxx_mbx_intr_disable(struct scsi_qla_host *ha); 256int qla4_8xxx_mbx_intr_disable(struct scsi_qla_host *ha);
257int qla4_8xxx_mbx_intr_enable(struct scsi_qla_host *ha); 257int qla4_8xxx_mbx_intr_enable(struct scsi_qla_host *ha);
258int qla4_8xxx_set_param(struct scsi_qla_host *ha, int param); 258int qla4_8xxx_set_param(struct scsi_qla_host *ha, int param);
259int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha);
259 260
260extern int ql4xextended_error_logging; 261extern int ql4xextended_error_logging;
261extern int ql4xdontresethba; 262extern int ql4xdontresethba;
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 9b67aadf9fd0..66f52d2b5cd4 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2833,7 +2833,7 @@ exit_set_idc_ver:
2833 return rval; 2833 return rval;
2834} 2834}
2835 2835
2836static int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha) 2836int qla4_8xxx_update_idc_reg(struct scsi_qla_host *ha)
2837{ 2837{
2838 uint32_t drv_active; 2838 uint32_t drv_active;
2839 int rval = QLA_SUCCESS; 2839 int rval = QLA_SUCCESS;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index afaba52ff250..81b3038c385c 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)
6135 ha->isp_ops->idc_lock(ha); 6135 ha->isp_ops->idc_lock(ha);
6136 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE, 6136 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
6137 QLA8XXX_DEV_COLD); 6137 QLA8XXX_DEV_COLD);
6138 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DRV_IDC_VERSION,
6139 QLA82XX_IDC_VERSION);
6140 ha->isp_ops->idc_unlock(ha); 6138 ha->isp_ops->idc_unlock(ha);
6139
6140 rval = qla4_8xxx_update_idc_reg(ha);
6141 if (rval == QLA_ERROR) {
6142 ql4_printk(KERN_INFO, ha, "scsi%ld: %s: HW State: FAILED\n",
6143 ha->host_no, __func__);
6144 ha->isp_ops->idc_lock(ha);
6145 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
6146 QLA8XXX_DEV_FAILED);
6147 ha->isp_ops->idc_unlock(ha);
6148 goto exit_error_recovery;
6149 }
6150
6141 clear_bit(AF_FW_RECOVERY, &ha->flags); 6151 clear_bit(AF_FW_RECOVERY, &ha->flags);
6142 rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER); 6152 rval = qla4xxx_initialize_adapter(ha, RESET_ADAPTER);
6143 6153
@@ -6195,6 +6205,7 @@ static uint32_t qla4_8xxx_error_recovery(struct scsi_qla_host *ha)
6195 ha->isp_ops->idc_unlock(ha); 6205 ha->isp_ops->idc_unlock(ha);
6196 } 6206 }
6197 } 6207 }
6208exit_error_recovery:
6198 clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags); 6209 clear_bit(DPC_RESET_ACTIVE, &ha->dpc_flags);
6199 return rval; 6210 return rval;
6200} 6211}