public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: linux-scsi@vger.kernel.org
Cc: jejb <james.bottomley@steeleye.com>
Subject: [PATCH] aha1542: queuecommand: change panic() to return
Date: Sat, 24 Jan 2004 22:00:06 -0800	[thread overview]
Message-ID: <20040124220006.48dd7746.rddunlap@osdl.org> (raw)


Hi,
Please apply to 2.6.current.

Thanks,
--
~Randy


From: Timmy Yee <shoujun@masterofpi.org>


Hi,

The aha1542 driver calls panic() if kmalloc() fails, which it shouldn't
do. This patch changes that by having the code return a nonzero value, so
it tells the SCSI mid-layer to retry the command, as suggested by Randy.

diff -puN drivers/scsi/aha1542.c~aha1542_qcommand_return drivers/scsi/aha1542.c


 linux-262-rc1-bk1-rddunlap/drivers/scsi/aha1542.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/scsi/aha1542.c~aha1542_qcommand_return drivers/scsi/aha1542.c
--- linux-262-rc1-bk1/drivers/scsi/aha1542.c~aha1542_qcommand_return	2004-01-23 15:51:47.000000000 -0800
+++ linux-262-rc1-bk1-rddunlap/drivers/scsi/aha1542.c	2004-01-23 15:51:47.000000000 -0800
@@ -708,7 +708,7 @@ static int aha1542_queuecommand(Scsi_Cmn
 		sgpnt = (struct scatterlist *) SCpnt->request_buffer;
 		cptr = (struct chain *) SCpnt->host_scribble;
 		if (cptr == NULL)
-			panic("aha1542.c: unable to allocate DMA memory\n");
+			return 1;
 		for (i = 0; i < SCpnt->use_sg; i++) {
 			if (sgpnt[i].length == 0 || SCpnt->use_sg > 16 ||
 			    (((int) sgpnt[i].offset) & 1) || (sgpnt[i].length & 1)) {

_

             reply	other threads:[~2004-01-25  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25  6:00 Randy.Dunlap [this message]
2004-01-25 19:34 ` [PATCH] aha1542: queuecommand: change panic() to return James Bottomley
2004-01-25 20:36   ` Randy.Dunlap

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=20040124220006.48dd7746.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=james.bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox