aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c33
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c12
4 files changed, 22 insertions, 30 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 9df4787715c0..e320d54d2e32 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -17,12 +17,12 @@
17 * | Queue Command and IO tracing | 0x302e | 0x3008 | 17 * | Queue Command and IO tracing | 0x302e | 0x3008 |
18 * | DPC Thread | 0x401c | | 18 * | DPC Thread | 0x401c | |
19 * | Async Events | 0x5059 | | 19 * | Async Events | 0x5059 | |
20 * | Timer Routines | 0x600d | | 20 * | Timer Routines | 0x6010 | 0x600e,0x600f |
21 * | User Space Interactions | 0x709d | | 21 * | User Space Interactions | 0x709d | |
22 * | Task Management | 0x8041 | | 22 * | Task Management | 0x8041 | 0x800b |
23 * | AER/EEH | 0x900f | | 23 * | AER/EEH | 0x900f | |
24 * | Virtual Port | 0xa007 | | 24 * | Virtual Port | 0xa007 | |
25 * | ISP82XX Specific | 0xb051 | | 25 * | ISP82XX Specific | 0xb052 | |
26 * | MultiQ | 0xc00b | | 26 * | MultiQ | 0xc00b | |
27 * | Misc | 0xd00b | | 27 * | Misc | 0xd00b | |
28 * ---------------------------------------------------------------------- 28 * ----------------------------------------------------------------------
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index ce32d8135c9e..c0c11afb685c 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -578,6 +578,7 @@ extern int qla82xx_check_md_needed(scsi_qla_host_t *);
578extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *); 578extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *);
579extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int); 579extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int);
580extern char *qdev_state(uint32_t); 580extern char *qdev_state(uint32_t);
581extern void qla82xx_clear_pending_mbx(scsi_qla_host_t *);
581 582
582/* BSG related functions */ 583/* BSG related functions */
583extern int qla24xx_bsg_request(struct fc_bsg_job *); 584extern int qla24xx_bsg_request(struct fc_bsg_job *);
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 8dd96da78704..60d999d335c5 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3817,6 +3817,19 @@ exit:
3817 return rval; 3817 return rval;
3818} 3818}
3819 3819
3820void qla82xx_clear_pending_mbx(scsi_qla_host_t *vha)
3821{
3822 struct qla_hw_data *ha = vha->hw;
3823
3824 if (ha->flags.mbox_busy) {
3825 ha->flags.mbox_int = 1;
3826 ql_log(ql_log_warn, vha, 0x6010,
3827 "Doing premature completion of mbx command.\n");
3828 if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags))
3829 complete(&ha->mbx_intr_comp);
3830 }
3831}
3832
3820void qla82xx_watchdog(scsi_qla_host_t *vha) 3833void qla82xx_watchdog(scsi_qla_host_t *vha)
3821{ 3834{
3822 uint32_t dev_state, halt_status; 3835 uint32_t dev_state, halt_status;
@@ -3874,16 +3887,8 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
3874 } 3887 }
3875 qla2xxx_wake_dpc(vha); 3888 qla2xxx_wake_dpc(vha);
3876 ha->flags.isp82xx_fw_hung = 1; 3889 ha->flags.isp82xx_fw_hung = 1;
3877 if (ha->flags.mbox_busy) { 3890 ql_log(ql_log_warn, vha, 0x6007, "Firmware hung.\n");
3878 ha->flags.mbox_int = 1; 3891 qla82xx_clear_pending_mbx(vha);
3879 ql_log(ql_log_warn, vha, 0x6007,
3880 "Due to FW hung, doing "
3881 "premature completion of mbx "
3882 "command.\n");
3883 if (test_bit(MBX_INTR_WAIT,
3884 &ha->mbx_cmd_flags))
3885 complete(&ha->mbx_intr_comp);
3886 }
3887 } 3892 }
3888 } 3893 }
3889 } 3894 }
@@ -4078,13 +4083,7 @@ qla82xx_chip_reset_cleanup(scsi_qla_host_t *vha)
4078 msleep(1000); 4083 msleep(1000);
4079 if (qla82xx_check_fw_alive(vha)) { 4084 if (qla82xx_check_fw_alive(vha)) {
4080 ha->flags.isp82xx_fw_hung = 1; 4085 ha->flags.isp82xx_fw_hung = 1;
4081 if (ha->flags.mbox_busy) { 4086 qla82xx_clear_pending_mbx(vha);
4082 ha->flags.mbox_int = 1;
4083 if (test_bit(MBX_INTR_WAIT,
4084 &ha->mbx_cmd_flags)) {
4085 complete(&ha->mbx_intr_comp);
4086 }
4087 }
4088 break; 4087 break;
4089 } 4088 }
4090 } 4089 }
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 71d62593c119..f9e5b85e84d8 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4009,16 +4009,8 @@ qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
4009 /* For ISP82XX complete any pending mailbox cmd */ 4009 /* For ISP82XX complete any pending mailbox cmd */
4010 if (IS_QLA82XX(ha)) { 4010 if (IS_QLA82XX(ha)) {
4011 ha->flags.isp82xx_fw_hung = 1; 4011 ha->flags.isp82xx_fw_hung = 1;
4012 if (ha->flags.mbox_busy) { 4012 ql_dbg(ql_dbg_aer, vha, 0x9001, "Pci channel io frozen\n");
4013 ha->flags.mbox_int = 1; 4013 qla82xx_clear_pending_mbx(vha);
4014 ql_dbg(ql_dbg_aer, vha, 0x9001,
4015 "Due to pci channel io frozen, doing premature "
4016 "completion of mbx command.\n");
4017 if (test_bit(MBX_INTR_WAIT,
4018 &ha->mbx_cmd_flags)) {
4019 complete(&ha->mbx_intr_comp);
4020 }
4021 }
4022 } 4014 }
4023 qla2x00_free_irqs(vha); 4015 qla2x00_free_irqs(vha);
4024 pci_disable_device(pdev); 4016 pci_disable_device(pdev);