aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorGiridhar Malavali <giridhar.malavali@qlogic.com>2012-01-11 05:44:16 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-01-16 03:32:08 -0500
commite6bd0ebd4a8ba9118e970c0214e912e35895c92b (patch)
tree9d2283459f996e7e578699a80fca29e8854209ea /drivers/scsi/qla4xxx
parent4f77083ed0325ceb9cd5701c0f335583df3dded2 (diff)
[SCSI] qla4xxx: Disable generating pause frames in case of FW hung
In case of FW hung ISP82xx generates continuous pause frames which causes switch to disable port. Added fix to disable generating pause frames in case of FW hung Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_mbx.c7
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.h3
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c10
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index c2593782fbbe..e1e66a45e4d0 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -219,6 +219,13 @@ int qla4xxx_mailbox_command(struct scsi_qla_host *ha, uint8_t inCount,
219 ha->mailbox_timeout_count++; 219 ha->mailbox_timeout_count++;
220 mbx_sts[0] = (-1); 220 mbx_sts[0] = (-1);
221 set_bit(DPC_RESET_HA, &ha->dpc_flags); 221 set_bit(DPC_RESET_HA, &ha->dpc_flags);
222 if (is_qla8022(ha)) {
223 ql4_printk(KERN_INFO, ha,
224 "disabling pause transmit on port 0 & 1.\n");
225 qla4_8xxx_wr_32(ha, QLA82XX_CRB_NIU + 0x98,
226 CRB_NIU_XG_PAUSE_CTL_P0 |
227 CRB_NIU_XG_PAUSE_CTL_P1);
228 }
222 goto mbox_exit; 229 goto mbox_exit;
223 } 230 }
224 231
diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/ql4_nx.h
index cfb2f2edac3a..dc45ac923691 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.h
+++ b/drivers/scsi/qla4xxx/ql4_nx.h
@@ -39,6 +39,9 @@ enum {
39 QLA82XX_TEMP_PANIC /* Fatal error, hardware has shut down. */ 39 QLA82XX_TEMP_PANIC /* Fatal error, hardware has shut down. */
40}; 40};
41 41
42#define CRB_NIU_XG_PAUSE_CTL_P0 0x1
43#define CRB_NIU_XG_PAUSE_CTL_P1 0x8
44
42#define QLA82XX_HW_H0_CH_HUB_ADR 0x05 45#define QLA82XX_HW_H0_CH_HUB_ADR 0x05
43#define QLA82XX_HW_H1_CH_HUB_ADR 0x0E 46#define QLA82XX_HW_H1_CH_HUB_ADR 0x0E
44#define QLA82XX_HW_H2_CH_HUB_ADR 0x03 47#define QLA82XX_HW_H2_CH_HUB_ADR 0x03
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 9d3eab513935..e2ef7762dc24 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2080,6 +2080,11 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
2080 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE); 2080 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
2081 2081
2082 if (qla4_8xxx_check_temp(ha)) { 2082 if (qla4_8xxx_check_temp(ha)) {
2083 ql4_printk(KERN_INFO, ha, "disabling pause"
2084 " transmit on port 0 & 1.\n");
2085 qla4_8xxx_wr_32(ha, QLA82XX_CRB_NIU + 0x98,
2086 CRB_NIU_XG_PAUSE_CTL_P0 |
2087 CRB_NIU_XG_PAUSE_CTL_P1);
2083 set_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags); 2088 set_bit(DPC_HA_UNRECOVERABLE, &ha->dpc_flags);
2084 qla4xxx_wake_dpc(ha); 2089 qla4xxx_wake_dpc(ha);
2085 } else if (dev_state == QLA82XX_DEV_NEED_RESET && 2090 } else if (dev_state == QLA82XX_DEV_NEED_RESET &&
@@ -2099,6 +2104,11 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
2099 } else { 2104 } else {
2100 /* Check firmware health */ 2105 /* Check firmware health */
2101 if (qla4_8xxx_check_fw_alive(ha)) { 2106 if (qla4_8xxx_check_fw_alive(ha)) {
2107 ql4_printk(KERN_INFO, ha, "disabling pause"
2108 " transmit on port 0 & 1.\n");
2109 qla4_8xxx_wr_32(ha, QLA82XX_CRB_NIU + 0x98,
2110 CRB_NIU_XG_PAUSE_CTL_P0 |
2111 CRB_NIU_XG_PAUSE_CTL_P1);
2102 halt_status = qla4_8xxx_rd_32(ha, 2112 halt_status = qla4_8xxx_rd_32(ha,
2103 QLA82XX_PEG_HALT_STATUS1); 2113 QLA82XX_PEG_HALT_STATUS1);
2104 2114