mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: scsi_scan.c: emulate windows behavior
@ 2001-11-13 18:21 Matthew Dharm
  2001-11-13 19:49 ` Rob Turk
  2001-11-13 22:52 ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Dharm @ 2001-11-13 18:21 UTC (permalink / raw)
  To: Linus Torvalds, Alan Cox, Kernel Developer List


[-- Attachment #1.1: Type: text/plain, Size: 987 bytes --]

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

[-- Attachment #1.2: scsi_scan.patch --]
[-- Type: text/plain, Size: 404 bytes --]

--- 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;

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-11-14  1:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 18:21 PATCH: scsi_scan.c: emulate windows behavior Matthew Dharm
2001-11-13 19:49 ` Rob Turk
2001-11-13 20:08   ` Matthew Dharm
2001-11-13 18:02     ` Gérard Roudier
2001-11-13 23:26     ` Alan Cox
2001-11-14  1:44       ` Matthew Dharm
2001-11-14  0:45   ` Riley Williams
2001-11-13 22:52 ` Alan Cox

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®