* [PATCH] qla2xxx -- FCP_RSP IU check during command completion.
@ 2004-02-10 23:17 Andrew Vasquez
2004-02-10 23:44 ` Andrew Vasquez
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Vasquez @ 2004-02-10 23:17 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
James,
While processing command completions in qla2x00_status_entry()
interrogate the FCP_RSP IU in case of any FCP protocol errors (FCP-3,
9.4.11) during command execution. If there were any failures, schedule
a retry of the command via DID_BUS_BUSY.
Please apply.
Regards,
Andrew Vasquez
[-- Attachment #2: Type: text/plain, Size: 1101 bytes --]
--- a/drivers/scsi/qla2xxx/qla_isr.c 2004-02-02 09:38:29.000000000 -0800
+++ b/drivers/scsi/qla2xxx/qla_isr.c 2004-02-10 13:51:30.474292736 -0800
@@ -828,6 +828,7 @@
uint8_t lscsi_status;
uint32_t resid;
uint8_t sense_sz = 0;
+ uint16_t rsp_info_len;
/* Fast path completion. */
if (le16_to_cpu(pkt->comp_status) == CS_COMPLETE &&
@@ -919,6 +920,23 @@
}
}
+ /* Check for any FCP transport errors. */
+ if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) {
+ rsp_info_len = le16_to_cpu(pkt->rsp_info_len);
+ if (rsp_info_len > 3 && pkt->rsp_info[3]) {
+ DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol "
+ "failure (%x/%02x%02x%02x%02x%02x%02x%02x%02x)..."
+ "retrying command\n", ha->host_no, b, t, l,
+ rsp_info_len, pkt->rsp_info[0], pkt->rsp_info[1],
+ pkt->rsp_info[2], pkt->rsp_info[3],
+ pkt->rsp_info[4], pkt->rsp_info[5],
+ pkt->rsp_info[6], pkt->rsp_info[7]));
+
+ cp->result = DID_BUS_BUSY << 16;
+ return;
+ }
+ }
+
/*
* Based on Host and scsi status generate status code for Linux
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] qla2xxx -- FCP_RSP IU check during command completion.
2004-02-10 23:17 [PATCH] qla2xxx -- FCP_RSP IU check during command completion Andrew Vasquez
@ 2004-02-10 23:44 ` Andrew Vasquez
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Vasquez @ 2004-02-10 23:44 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
On Tue, 2004-02-10 at 15:17, Andrew Vasquez wrote:
> James,
>
> While processing command completions in qla2x00_status_entry()
> interrogate the FCP_RSP IU in case of any FCP protocol errors (FCP-3,
> 9.4.11) during command execution. If there were any failures, schedule
> a retry of the command via DID_BUS_BUSY.
>
> Please apply.
>
Damn, this patch is incomplete. Corrected patch attached. Thanks to RA
for pointing this out.
Regards,
Andrew Vasquez
[-- Attachment #2: QL1_fcp_protocol_errors_2.diff --]
[-- Type: text/plain, Size: 1133 bytes --]
--- a/drivers/scsi/qla2xxx/qla_isr.c 2004-02-02 09:38:29.000000000 -0800
+++ b/drivers/scsi/qla2xxx/qla_isr.c 2004-02-10 13:51:30.474292736 -0800
@@ -828,6 +828,7 @@
uint8_t lscsi_status;
uint32_t resid;
uint8_t sense_sz = 0;
+ uint16_t rsp_info_len;
/* Fast path completion. */
if (le16_to_cpu(pkt->comp_status) == CS_COMPLETE &&
@@ -919,6 +920,24 @@
}
}
+ /* Check for any FCP transport errors. */
+ if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) {
+ rsp_info_len = le16_to_cpu(pkt->rsp_info_len);
+ if (rsp_info_len > 3 && pkt->rsp_info[3]) {
+ DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol "
+ "failure (%x/%02x%02x%02x%02x%02x%02x%02x%02x)..."
+ "retrying command\n", ha->host_no, b, t, l,
+ rsp_info_len, pkt->rsp_info[0], pkt->rsp_info[1],
+ pkt->rsp_info[2], pkt->rsp_info[3],
+ pkt->rsp_info[4], pkt->rsp_info[5],
+ pkt->rsp_info[6], pkt->rsp_info[7]));
+
+ cp->result = DID_BUS_BUSY << 16;
+ add_to_done_queue(ha, sp);
+ return;
+ }
+ }
+
/*
* Based on Host and scsi status generate status code for Linux
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-10 23:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 23:17 [PATCH] qla2xxx -- FCP_RSP IU check during command completion Andrew Vasquez
2004-02-10 23:44 ` Andrew Vasquez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox