aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 0d48fb4d104..3fc1d256636 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * QLogic iSCSI HBA Driver 2 * QLogic iSCSI HBA Driver
3 * Copyright (c) 2003-2006 QLogic Corporation 3 * Copyright (c) 2003-2010 QLogic Corporation
4 * 4 *
5 * See LICENSE.qla4xxx for copyright and licensing details. 5 * See LICENSE.qla4xxx for copyright and licensing details.
6 */ 6 */
@@ -706,18 +706,22 @@ void qla4_8xxx_watchdog(struct scsi_qla_host *ha)
706 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE); 706 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
707 707
708 /* don't poll if reset is going on */ 708 /* don't poll if reset is going on */
709 if (!test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags)) { 709 if (!(test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags) ||
710 test_bit(DPC_RESET_HA, &ha->dpc_flags) ||
711 test_bit(DPC_RESET_ACTIVE, &ha->dpc_flags))) {
710 if (dev_state == QLA82XX_DEV_NEED_RESET && 712 if (dev_state == QLA82XX_DEV_NEED_RESET &&
711 !test_bit(DPC_RESET_HA, &ha->dpc_flags)) { 713 !test_bit(DPC_RESET_HA, &ha->dpc_flags)) {
712 printk("scsi%ld: %s: HW State: NEED RESET!\n", 714 if (!ql4xdontresethba) {
713 ha->host_no, __func__); 715 ql4_printk(KERN_INFO, ha, "%s: HW State: "
714 set_bit(DPC_RESET_HA, &ha->dpc_flags); 716 "NEED RESET!\n", __func__);
715 qla4xxx_wake_dpc(ha); 717 set_bit(DPC_RESET_HA, &ha->dpc_flags);
716 qla4xxx_mailbox_premature_completion(ha); 718 qla4xxx_wake_dpc(ha);
719 qla4xxx_mailbox_premature_completion(ha);
720 }
717 } else if (dev_state == QLA82XX_DEV_NEED_QUIESCENT && 721 } else if (dev_state == QLA82XX_DEV_NEED_QUIESCENT &&
718 !test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags)) { 722 !test_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags)) {
719 printk("scsi%ld: %s: HW State: NEED QUIES!\n", 723 ql4_printk(KERN_INFO, ha, "%s: HW State: NEED QUIES!\n",
720 ha->host_no, __func__); 724 __func__);
721 set_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags); 725 set_bit(DPC_HA_NEED_QUIESCENT, &ha->dpc_flags);
722 qla4xxx_wake_dpc(ha); 726 qla4xxx_wake_dpc(ha);
723 } else { 727 } else {
@@ -1721,6 +1725,14 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
1721 if (!test_bit(AF_ONLINE, &ha->flags)) { 1725 if (!test_bit(AF_ONLINE, &ha->flags)) {
1722 ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n"); 1726 ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n");
1723 1727
1728 if (is_qla8022(ha) && ql4xdontresethba) {
1729 /* Put the device in failed state. */
1730 DEBUG2(printk(KERN_ERR "HW STATE: FAILED\n"));
1731 qla4_8xxx_idc_lock(ha);
1732 qla4_8xxx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
1733 QLA82XX_DEV_FAILED);
1734 qla4_8xxx_idc_unlock(ha);
1735 }
1724 ret = -ENODEV; 1736 ret = -ENODEV;
1725 goto probe_failed; 1737 goto probe_failed;
1726 } 1738 }