diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2011-12-02 01:42:06 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-12-15 01:57:41 -0500 |
commit | 4c6a794d2c0affde28f46ef5646cd41cd1a35f06 (patch) | |
tree | c6e5dc2180854e82c3ffbbc33cff66b6d9ebc349 /drivers/scsi | |
parent | 0c70d84b794c9a99f7395b617ecaef34c00d82ec (diff) |
[SCSI] qla4xxx: Perform context resets in case of context failures.
For 4032, context reset was the same as chip reset, and any firmware
issue was recovered by performing a chip reset.
For 82xx, the iSCSI firmware runs along with FCoE and the NIC
firmware contexts, and an error encountered doesnot essentially mean
that a chip reset is necessary.
Perform Chip resets only in the following cases:
1. Mailbox system error.
2. Mailbox command timeout.
3. fw_heartbeat_counter counter stops incrementing.
For all other cases, only perform a context reset.
1. Command Completion with an invalid srb.
2. Other mailbox failures.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Shyam Sunder <shyam.sunder@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_isr.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c index 827e93078b94..95828862eea0 100644 --- a/drivers/scsi/qla4xxx/ql4_isr.c +++ b/drivers/scsi/qla4xxx/ql4_isr.c | |||
@@ -123,13 +123,13 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha, | |||
123 | 123 | ||
124 | srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); | 124 | srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); |
125 | if (!srb) { | 125 | if (!srb) { |
126 | DEBUG2(printk(KERN_WARNING "scsi%ld: %s: Status Entry invalid " | 126 | ql4_printk(KERN_WARNING, ha, "%s invalid status entry: " |
127 | "handle 0x%x, sp=%p. This cmd may have already " | 127 | "handle=0x%0x, srb=%p\n", __func__, |
128 | "been completed.\n", ha->host_no, __func__, | 128 | sts_entry->handle, srb); |
129 | le32_to_cpu(sts_entry->handle), srb)); | 129 | if (is_qla8022(ha)) |
130 | ql4_printk(KERN_WARNING, ha, "%s invalid status entry:" | 130 | set_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags); |
131 | " handle=0x%0x\n", __func__, sts_entry->handle); | 131 | else |
132 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | 132 | set_bit(DPC_RESET_HA, &ha->dpc_flags); |
133 | return; | 133 | return; |
134 | } | 134 | } |
135 | 135 | ||
@@ -563,7 +563,11 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
563 | case MBOX_ASTS_DHCP_LEASE_EXPIRED: | 563 | case MBOX_ASTS_DHCP_LEASE_EXPIRED: |
564 | DEBUG2(printk("scsi%ld: AEN %04x, ERROR Status, " | 564 | DEBUG2(printk("scsi%ld: AEN %04x, ERROR Status, " |
565 | "Reset HA\n", ha->host_no, mbox_status)); | 565 | "Reset HA\n", ha->host_no, mbox_status)); |
566 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | 566 | if (is_qla8022(ha)) |
567 | set_bit(DPC_RESET_HA_FW_CONTEXT, | ||
568 | &ha->dpc_flags); | ||
569 | else | ||
570 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | ||
567 | break; | 571 | break; |
568 | 572 | ||
569 | case MBOX_ASTS_LINK_UP: | 573 | case MBOX_ASTS_LINK_UP: |
@@ -617,9 +621,13 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha, | |||
617 | (mbox_sts[2] == ACB_STATE_ACQUIRING))) | 621 | (mbox_sts[2] == ACB_STATE_ACQUIRING))) |
618 | set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags); | 622 | set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags); |
619 | else if ((mbox_sts[3] == ACB_STATE_ACQUIRING) && | 623 | else if ((mbox_sts[3] == ACB_STATE_ACQUIRING) && |
620 | (mbox_sts[2] == ACB_STATE_VALID)) | 624 | (mbox_sts[2] == ACB_STATE_VALID)) { |
621 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | 625 | if (is_qla8022(ha)) |
622 | else if ((mbox_sts[3] == ACB_STATE_UNCONFIGURED)) | 626 | set_bit(DPC_RESET_HA_FW_CONTEXT, |
627 | &ha->dpc_flags); | ||
628 | else | ||
629 | set_bit(DPC_RESET_HA, &ha->dpc_flags); | ||
630 | } else if ((mbox_sts[3] == ACB_STATE_UNCONFIGURED)) | ||
623 | complete(&ha->disable_acb_comp); | 631 | complete(&ha->disable_acb_comp); |
624 | break; | 632 | break; |
625 | 633 | ||