[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>
This commit is contained in:
Vikas Chaudhary 2011-12-01 22:42:06 -08:00 committed by James Bottomley
parent 0c70d84b79
commit 4c6a794d2c
1 changed files with 19 additions and 11 deletions

View File

@ -123,13 +123,13 @@ static void qla4xxx_status_entry(struct scsi_qla_host *ha,
srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle)); srb = qla4xxx_del_from_active_array(ha, le32_to_cpu(sts_entry->handle));
if (!srb) { if (!srb) {
DEBUG2(printk(KERN_WARNING "scsi%ld: %s: Status Entry invalid " ql4_printk(KERN_WARNING, ha, "%s invalid status entry: "
"handle 0x%x, sp=%p. This cmd may have already " "handle=0x%0x, srb=%p\n", __func__,
"been completed.\n", ha->host_no, __func__, sts_entry->handle, srb);
le32_to_cpu(sts_entry->handle), srb)); if (is_qla8022(ha))
ql4_printk(KERN_WARNING, ha, "%s invalid status entry:" set_bit(DPC_RESET_HA_FW_CONTEXT, &ha->dpc_flags);
" handle=0x%0x\n", __func__, sts_entry->handle); else
set_bit(DPC_RESET_HA, &ha->dpc_flags); set_bit(DPC_RESET_HA, &ha->dpc_flags);
return; return;
} }
@ -563,7 +563,11 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
case MBOX_ASTS_DHCP_LEASE_EXPIRED: case MBOX_ASTS_DHCP_LEASE_EXPIRED:
DEBUG2(printk("scsi%ld: AEN %04x, ERROR Status, " DEBUG2(printk("scsi%ld: AEN %04x, ERROR Status, "
"Reset HA\n", ha->host_no, mbox_status)); "Reset HA\n", ha->host_no, mbox_status));
set_bit(DPC_RESET_HA, &ha->dpc_flags); if (is_qla8022(ha))
set_bit(DPC_RESET_HA_FW_CONTEXT,
&ha->dpc_flags);
else
set_bit(DPC_RESET_HA, &ha->dpc_flags);
break; break;
case MBOX_ASTS_LINK_UP: case MBOX_ASTS_LINK_UP:
@ -617,9 +621,13 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
(mbox_sts[2] == ACB_STATE_ACQUIRING))) (mbox_sts[2] == ACB_STATE_ACQUIRING)))
set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags); set_bit(DPC_GET_DHCP_IP_ADDR, &ha->dpc_flags);
else if ((mbox_sts[3] == ACB_STATE_ACQUIRING) && else if ((mbox_sts[3] == ACB_STATE_ACQUIRING) &&
(mbox_sts[2] == ACB_STATE_VALID)) (mbox_sts[2] == ACB_STATE_VALID)) {
set_bit(DPC_RESET_HA, &ha->dpc_flags); if (is_qla8022(ha))
else if ((mbox_sts[3] == ACB_STATE_UNCONFIGURED)) set_bit(DPC_RESET_HA_FW_CONTEXT,
&ha->dpc_flags);
else
set_bit(DPC_RESET_HA, &ha->dpc_flags);
} else if ((mbox_sts[3] == ACB_STATE_UNCONFIGURED))
complete(&ha->disable_acb_comp); complete(&ha->disable_acb_comp);
break; break;