aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_nx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_nx.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 3e119ae78397..e031a734836e 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -1418,7 +1418,7 @@ static int qla4_8xxx_rcvpeg_ready(struct scsi_qla_host *ha)
1418 return QLA_SUCCESS; 1418 return QLA_SUCCESS;
1419} 1419}
1420 1420
1421static inline void 1421inline void
1422qla4_8xxx_set_drv_active(struct scsi_qla_host *ha) 1422qla4_8xxx_set_drv_active(struct scsi_qla_host *ha)
1423{ 1423{
1424 uint32_t drv_active; 1424 uint32_t drv_active;
@@ -1441,11 +1441,15 @@ qla4_8xxx_clear_drv_active(struct scsi_qla_host *ha)
1441static inline int 1441static inline int
1442qla4_8xxx_need_reset(struct scsi_qla_host *ha) 1442qla4_8xxx_need_reset(struct scsi_qla_host *ha)
1443{ 1443{
1444 uint32_t drv_state; 1444 uint32_t drv_state, drv_active;
1445 int rval; 1445 int rval;
1446 1446
1447 drv_active = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DRV_ACTIVE);
1447 drv_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DRV_STATE); 1448 drv_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DRV_STATE);
1448 rval = drv_state & (1 << (ha->func_num * 4)); 1449 rval = drv_state & (1 << (ha->func_num * 4));
1450 if ((test_bit(AF_EEH_BUSY, &ha->flags)) && drv_active)
1451 rval = 1;
1452
1449 return rval; 1453 return rval;
1450} 1454}
1451 1455
@@ -1949,7 +1953,8 @@ qla4_8xxx_get_fdt_info(struct scsi_qla_host *ha)
1949 uint16_t cnt, chksum; 1953 uint16_t cnt, chksum;
1950 uint16_t *wptr; 1954 uint16_t *wptr;
1951 struct qla_fdt_layout *fdt; 1955 struct qla_fdt_layout *fdt;
1952 uint16_t mid, fid; 1956 uint16_t mid = 0;
1957 uint16_t fid = 0;
1953 struct ql82xx_hw_data *hw = &ha->hw; 1958 struct ql82xx_hw_data *hw = &ha->hw;
1954 1959
1955 hw->flash_conf_off = FARX_ACCESS_FLASH_CONF; 1960 hw->flash_conf_off = FARX_ACCESS_FLASH_CONF;
@@ -2105,6 +2110,9 @@ qla4_8xxx_isp_reset(struct scsi_qla_host *ha)
2105 qla4_8xxx_clear_rst_ready(ha); 2110 qla4_8xxx_clear_rst_ready(ha);
2106 qla4_8xxx_idc_unlock(ha); 2111 qla4_8xxx_idc_unlock(ha);
2107 2112
2113 if (rval == QLA_SUCCESS)
2114 clear_bit(AF_FW_RECOVERY, &ha->flags);
2115
2108 return rval; 2116 return rval;
2109} 2117}
2110 2118
@@ -2145,7 +2153,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
2145 goto exit_validate_mac82; 2153 goto exit_validate_mac82;
2146 } 2154 }
2147 2155
2148 if (mbox_sts[4] < sizeof(*sys_info)) { 2156 /* Make sure we receive the minimum required data to cache internally */
2157 if (mbox_sts[4] < offsetof(struct mbx_sys_info, reserved)) {
2149 DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive" 2158 DEBUG2(printk("scsi%ld: %s: GET_SYS_INFO data receive"
2150 " error (%x)\n", ha->host_no, __func__, mbox_sts[4])); 2159 " error (%x)\n", ha->host_no, __func__, mbox_sts[4]));
2151 goto exit_validate_mac82; 2160 goto exit_validate_mac82;