lkml.org 
[lkml]   [2001]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: scsi_scan.c: emulate windows behavior
I would have sworn we already patched this, but now I can find no record of
it.

Attached is a one-liner patch to scsi_scan.c, which changes the length of
the INQUIRY data request from 255 bytes to 36 bytes. This subtle change
makes Linux act more like Win/MacOS and other popular OSes, and reduces
incompatibility with a broad range of out-of-spec devices that will simply
die if asked for more than the required minimum of 36 bytes.

Did we patch this before? I can't find it in the l-k archives, but I'm
almost positive we have. I remeber this because this problem plagues some
USB devices, which just crash if you ask for more than 36 bytes of data.

Patch is attached. Please apply.

Matt

--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver

G: Let me guess, you started on the 'net with AOL, right?
C: WOW! d00d! U r leet!
-- Greg and Customer
User Friendly, 2/12/1999
--- linux/drivers/scsi/scsi_scan.old Tue Nov 13 10:12:19 2001
+++ linux/drivers/scsi/scsi_scan.c Tue Nov 13 10:13:58 2001
@@ -543,7 +543,7 @@
scsi_cmd[1] = 0; /* SCSI_3 and higher, don't touch */
scsi_cmd[2] = 0;
scsi_cmd[3] = 0;
- scsi_cmd[4] = 255;
+ scsi_cmd[4] = 36; /* 36 bytes, just like Win/MacOS */
scsi_cmd[5] = 0;
SRpnt->sr_cmd_len = 0;
SRpnt->sr_data_direction = SCSI_DATA_READ;[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.090 / U:41.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site