linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFT] libata "DMA timeout" fix
@ 2004-02-28 19:10 Jeff Garzik
  2004-02-28 20:49 ` James Bottomley
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2004-02-28 19:10 UTC (permalink / raw)
  To: Linux Kernel, linux-ide, SCSI Mailing List

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]


The desired effect of a DMA timeout should be to throw an I/O error, but 
that doesn't appear to be happening.

Those seeing DMA timeout messages, please test this patch.

Kernel hacker note:  James B recommended that I implement my own 
scsi_done() function, which duplicates the real scsi_done() but omits 
the scsi_delete_timer() call.  This is probably the best long term fix, 
but doing so involves exporting several currently-private bits of SCSI 
mid-layer, which I would rather not do.  Probably best to create a 
__scsi_done() inside the SCSI mid-layer, and call that.

	Jeff, the only user of ->eh_strategy_handler() in any kernel




[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 624 bytes --]

===== drivers/scsi/libata-core.c 1.19 vs edited =====
--- 1.19/drivers/scsi/libata-core.c	Wed Feb 25 22:41:13 2004
+++ edited/drivers/scsi/libata-core.c	Sat Feb 28 14:03:18 2004
@@ -2130,6 +2130,14 @@
 				cmd->result = SAM_STAT_CHECK_CONDITION;
 			else
 				ata_to_sense_error(qc);
+
+			/* hack alert! we need this to get past the
+			 * first check in scsi_done().  libata is the
+			 * -only- user of ->eh_strategy_handler() in
+			 * any kernel tree, which exposes some incorrect
+			 * assumptions in the SCSI layer.
+			 */
+			scsi_add_timer(cmd, 2000 * HZ, NULL);
 		} else {
 			cmd->result = SAM_STAT_GOOD;
 		}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-28 21:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-28 19:10 [PATCH/RFT] libata "DMA timeout" fix Jeff Garzik
2004-02-28 20:49 ` James Bottomley
2004-02-28 21:23   ` Jeff Garzik
2004-02-28 21:28     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).