mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.2.18: Remove bogus "Wrong buffer length" warnings from aha1542
@ 2001-02-21 10:24 Nick Holloway
  0 siblings, 0 replies; only message in thread
From: Nick Holloway @ 2001-02-21 10:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-21 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-21 10:24 2.2.18: Remove bogus "Wrong buffer length" warnings from aha1542 Nick Holloway

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®