public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi_debug delayed result, lk 2.4.27
@ 2004-08-31 12:33 Douglas Gilbert
  2004-08-31 13:29 ` Douglas Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Gilbert @ 2004-08-31 12:33 UTC (permalink / raw)
  To: SCSI development list; +Cc: marcelo.tosatti

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

The error result code is not conveyed back to the mid-level
for delayed commands (i.e. when scsi_debug_delay!=0) in
lk 2.4.27 (and earlier). [This bug is not present in the
lk 2.6 version of scsi_debug.]

Change:
     - convey error result back to midlevel for delayed commands

Doug Gilbert

[-- Attachment #2: scsi_debug2427.diff --]
[-- Type: text/x-patch, Size: 676 bytes --]

--- linux/drivers/scsi/scsi_debug.c	2003-03-20 20:28:33.000000000 +1000
+++ linux/drivers/scsi/scsi_debug.c2427fix	2004-08-31 20:01:41.674371448 +1000
@@ -48,7 +48,7 @@
 
 #include "scsi_debug.h"
 
-static const char * scsi_debug_version_str = "Version: 0.62 (20030320)";
+static const char * scsi_debug_version_str = "Version: 0.63 (20040831)";
 
 
 #ifndef SCSI_CMD_READ_16
@@ -772,8 +772,10 @@
 		return;
 	}
 	sqcp->in_use = 0;
-	if (sqcp->done_funct)
+	if (sqcp->done_funct) {
+		sqcp->a_cmnd->result = sqcp->scsi_result;
 		sqcp->done_funct(sqcp->a_cmnd); /* callback to mid level */
+	}
 	sqcp->done_funct = NULL;
 	spin_unlock_irqrestore(&queued_arr_lock, iflags);
 }

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

end of thread, other threads:[~2004-08-31 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-31 12:33 [PATCH] scsi_debug delayed result, lk 2.4.27 Douglas Gilbert
2004-08-31 13:29 ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox