All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: SCSI development list <linux-scsi@vger.kernel.org>
Cc: marcelo.tosatti@cyclades.com
Subject: [PATCH] scsi_debug delayed result, lk 2.4.27
Date: Tue, 31 Aug 2004 22:33:14 +1000	[thread overview]
Message-ID: <4134700A.30701@torque.net> (raw)

[-- 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);
 }

             reply	other threads:[~2004-08-31 12:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31 12:33 Douglas Gilbert [this message]
2004-08-31 13:29 ` [PATCH] scsi_debug delayed result, lk 2.4.27 Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4134700A.30701@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.