aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2013-03-07 05:43:10 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-04-10 14:45:16 -0400
commit6cf9412124a4a2166b4d5a6919050f7fdfb82b64 (patch)
tree923ad0a681bfff24d1e235111004167d23522657 /drivers/scsi/qla4xxx
parentebd777dec72991a26af247ab83c8f7f288b28621 (diff)
[SCSI] qla4xxx: Fix double reset in case of firmware hung for ISP83XX
In case of firmware hung we need to call "mailbox_premature_completion" to complete any pending mbox command as firmware is not alive. 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_os.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index b3ccb1ad8c02..ade1ba6b3451 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -2543,6 +2543,7 @@ static void qla4_8xxx_process_fw_error(struct scsi_qla_host *ha)
2543void qla4_8xxx_watchdog(struct scsi_qla_host *ha) 2543void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
2544{ 2544{
2545 uint32_t dev_state; 2545 uint32_t dev_state;
2546 uint32_t idc_ctrl;
2546 2547
2547 /* don't poll if reset is going on */ 2548 /* don't poll if reset is going on */
2548 if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) || 2549 if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) ||
@@ -2561,10 +2562,23 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
2561 qla4xxx_wake_dpc(ha); 2562 qla4xxx_wake_dpc(ha);
2562 } else if (dev_state == QLA8XXX_DEV_NEED_RESET && 2563 } else if (dev_state == QLA8XXX_DEV_NEED_RESET &&
2563 !test_bit(DPC_RESET_HA, &ha->dpc_flags)) { 2564 !test_bit(DPC_RESET_HA, &ha->dpc_flags)) {
2565
2566 ql4_printk(KERN_INFO, ha, "%s: HW State: NEED RESET!\n",
2567 __func__);
2568
2569 if (is_qla8032(ha)) {
2570 idc_ctrl = qla4_83xx_rd_reg(ha,
2571 QLA83XX_IDC_DRV_CTRL);
2572 if (!(idc_ctrl & GRACEFUL_RESET_BIT1)) {
2573 ql4_printk(KERN_INFO, ha, "%s: Graceful reset bit is not set\n",
2574 __func__);
2575 qla4xxx_mailbox_premature_completion(
2576 ha);
2577 }
2578 }
2579
2564 if (is_qla8032(ha) || 2580 if (is_qla8032(ha) ||
2565 (is_qla8022(ha) && !ql4xdontresethba)) { 2581 (is_qla8022(ha) && !ql4xdontresethba)) {
2566 ql4_printk(KERN_INFO, ha, "%s: HW State: "
2567 "NEED RESET!\n", __func__);
2568 set_bit(DPC_RESET_HA, &ha->dpc_flags); 2582 set_bit(DPC_RESET_HA, &ha->dpc_flags);
2569 qla4xxx_wake_dpc(ha); 2583 qla4xxx_wake_dpc(ha);
2570 } 2584 }