All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: linux-scsi@vger.kernel.dk,
	James Bottomley <James.Bottomley@steeleye.com>
Cc: linuxraid@amcc.com, Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] 3ware bad queuecommand returns
Date: Fri, 19 Nov 2004 09:43:13 +0100	[thread overview]
Message-ID: <20041119084312.GW26240@suse.de> (raw)

Hi,

If your ->queuecommand() completes a command through done, it must not
return non-zero to the mid layer so that it takes ownership of the
command again.

Signed-off-by: Jens Axboe <axboe@suse.de>


===== drivers/scsi/3w-9xxx.c 1.4 vs edited =====
--- 1.4/drivers/scsi/3w-9xxx.c	2004-07-16 17:20:43 +02:00
+++ edited/drivers/scsi/3w-9xxx.c	2004-11-18 22:55:58 +01:00
@@ -1746,6 +1746,7 @@ static int twa_scsi_queue(struct scsi_cm
 		twa_free_request_id(tw_dev, request_id);
 		SCpnt->result = (DID_ERROR << 16);
 		done(SCpnt);
+		reval = 0;
 	}
 
 	return retval;
===== drivers/scsi/3w-xxxx.c 1.47 vs edited =====
--- 1.47/drivers/scsi/3w-xxxx.c	2004-10-07 05:20:16 +02:00
+++ edited/drivers/scsi/3w-xxxx.c	2004-11-18 22:55:31 +01:00
@@ -2067,6 +2067,7 @@ static int tw_scsi_queue(struct scsi_cmn
 		tw_state_request_finish(tw_dev, request_id);
 		SCpnt->result = (DID_ERROR << 16);
 		done(SCpnt);
+		retval = 0;
 	}
 out:
 	return retval;

-- 
Jens Axboe


                 reply	other threads:[~2004-11-19  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20041119084312.GW26240@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.dk \
    --cc=linuxraid@amcc.com \
    --cc=torvalds@osdl.org \
    /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.