From: Nick.Holloway@pyrites.org.uk (Nick Holloway)
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: 2.2.18: Remove bogus "Wrong buffer length" warnings from aha1542
Date: Wed, 21 Feb 2001 10:24:25 +0000 [thread overview]
Message-ID: <20010221102425.A5153@alfie.demon.co.uk> (raw)
I've just installed an AHA1542 SCSI card, and when performing a backup,
I'm finding the kernel is spewing out the following message:
Wrong buffer length supplied for request sense (256)
This is because the sense_buffer is 16 bytes, but the buffer supplied
is 256 bytes.
Looking at the 2.4 version of the driver, I see that this message has
been disabled, because scsi_request_sense() provides a buffer of size 256.
The following is a version of the 2.4 patch applied to 2.2. Please apply.
I did notice that aha1740.c also has the same bogus check on the buffer,
but I haven't provided a patch, as this is still present in 2.4, and a
patch for that should also be included.
--- linux-2.2/drivers/scsi/aha1542.c~ Wed Feb 21 10:13:02 2001
+++ linux-2.2/drivers/scsi/aha1542.c Wed Feb 21 10:15:51 2001
@@ -560,7 +560,9 @@
done(SCpnt); return 0;});
if(*cmd == REQUEST_SENSE){
-#ifndef DEBUG
+#if 0
+ /* scsi_request_sense() provides a buffer of size 256,
+ so there is no reason to expect equality */
if (bufflen != sizeof(SCpnt->sense_buffer)) {
printk("Wrong buffer length supplied for request sense (%d)\n",bufflen);
};
--
`O O' | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/
reply other threads:[~2001-02-21 10:30 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=20010221102425.A5153@alfie.demon.co.uk \
--to=nick.holloway@pyrites.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®