Commit 8f7daead authored by Giridhar Malavali's avatar Giridhar Malavali Committed by James Bottomley

[SCSI] qla2xxx: Perform FCoE context reset before trying adapter reset for ISP82xx.

For certain failures, try to recover first by doing FCoE context reset before
attempting big hammer approach(adpater reset).
Signed-off-by: default avatarGiridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: default avatarMadhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent aee3dbcd
...@@ -843,7 +843,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha, ...@@ -843,7 +843,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha,
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
"Invalid SCSI completion handle %d.\n", index); "Invalid SCSI completion handle %d.\n", index);
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
return; return;
} }
...@@ -861,7 +864,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha, ...@@ -861,7 +864,10 @@ qla2x00_process_completed_request(struct scsi_qla_host *vha,
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
"Invalid ISP SCSI completion handle\n"); "Invalid ISP SCSI completion handle\n");
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
} }
} }
...@@ -878,7 +884,10 @@ qla2x00_get_sp_from_handle(scsi_qla_host_t *vha, const char *func, ...@@ -878,7 +884,10 @@ qla2x00_get_sp_from_handle(scsi_qla_host_t *vha, const char *func,
if (index >= MAX_OUTSTANDING_COMMANDS) { if (index >= MAX_OUTSTANDING_COMMANDS) {
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
"%s: Invalid completion handle (%x).\n", func, index); "%s: Invalid completion handle (%x).\n", func, index);
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
goto done; goto done;
} }
sp = req->outstanding_cmds[index]; sp = req->outstanding_cmds[index];
...@@ -1564,7 +1573,10 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) ...@@ -1564,7 +1573,10 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
"scsi(%ld): Invalid status handle (0x%x).\n", vha->host_no, "scsi(%ld): Invalid status handle (0x%x).\n", vha->host_no,
sts->handle); sts->handle);
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha); qla2xxx_wake_dpc(vha);
return; return;
} }
...@@ -1909,13 +1921,17 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) ...@@ -1909,13 +1921,17 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)
qla2x00_sp_compl(ha, sp); qla2x00_sp_compl(ha, sp);
} else if (pkt->entry_type == COMMAND_A64_TYPE || pkt->entry_type == } else if (pkt->entry_type == COMMAND_A64_TYPE || pkt->entry_type ==
COMMAND_TYPE || pkt->entry_type == COMMAND_TYPE_7) { COMMAND_TYPE || pkt->entry_type == COMMAND_TYPE_7
|| pkt->entry_type == COMMAND_TYPE_6) {
DEBUG2(printk("scsi(%ld): Error entry - invalid handle\n", DEBUG2(printk("scsi(%ld): Error entry - invalid handle\n",
vha->host_no)); vha->host_no));
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
"Error entry - invalid handle\n"); "Error entry - invalid handle\n");
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha); qla2xxx_wake_dpc(vha);
} }
} }
......
...@@ -3612,7 +3612,8 @@ qla2x00_timer(scsi_qla_host_t *vha) ...@@ -3612,7 +3612,8 @@ qla2x00_timer(scsi_qla_host_t *vha)
/* Loop down handler. */ /* Loop down handler. */
if (atomic_read(&vha->loop_down_timer) > 0 && if (atomic_read(&vha->loop_down_timer) > 0 &&
!(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) !(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) &&
!(test_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags))
&& vha->flags.online) { && vha->flags.online) {
if (atomic_read(&vha->loop_down_timer) == if (atomic_read(&vha->loop_down_timer) ==
...@@ -3648,7 +3649,11 @@ qla2x00_timer(scsi_qla_host_t *vha) ...@@ -3648,7 +3649,11 @@ qla2x00_timer(scsi_qla_host_t *vha)
if (!(sfcp->flags & FCF_FCP2_DEVICE)) if (!(sfcp->flags & FCF_FCP2_DEVICE))
continue; continue;
set_bit(ISP_ABORT_NEEDED, if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED,
&vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED,
&vha->dpc_flags); &vha->dpc_flags);
break; break;
} }
...@@ -3667,7 +3672,12 @@ qla2x00_timer(scsi_qla_host_t *vha) ...@@ -3667,7 +3672,12 @@ qla2x00_timer(scsi_qla_host_t *vha)
qla_printk(KERN_WARNING, ha, qla_printk(KERN_WARNING, ha,
"Loop down - aborting ISP.\n"); "Loop down - aborting ISP.\n");
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); if (IS_QLA82XX(ha))
set_bit(FCOE_CTX_RESET_NEEDED,
&vha->dpc_flags);
else
set_bit(ISP_ABORT_NEEDED,
&vha->dpc_flags);
} }
} }
DEBUG3(printk("scsi(%ld): Loop Down - seconds remaining %d\n", DEBUG3(printk("scsi(%ld): Loop Down - seconds remaining %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment