Alan Stern b876aef7f8 [PATCH] PATCH: usb-storage: move GetMaxLUN later in time
This patch is originally from Alan Stern (as557).  It has been re-diffed
against a current tree, and I also corrected a minor merging error.

Some time ago we introduced a delay before device scanning, because many
devices do not like to receive SCSI commands right after enumeration.
Now it turns out there's a device that doesn't like to receive
Get-Max-LUN right after enumeration either.  Accordingly this patch
delays the Get-Max-LUN request until the beginning of the scanning
procedure.  This fixes Bugzilla entry #5010.

Three things are worth noting.  First, I removed the locking code from
usb_stor_acquire_resources.  It's not needed, because the locking is to
protect against disconnect events and acquire_resources is only called
during probe (so the disconnect routine can't be called).  Second, I
initialized to 0 the buffer used for the Get-Max-LUN response.  It's not
really necessary, but it will prevent random values from showing up in
the debugging log when the request fails.  Third, I added a test against
the SINGLE_LUN flag.  This will allow us to use the flag to indicate
Bulk-only devices that can't handle Get-Max-LUN.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 16:47:50 -07:00
..
2005-09-20 21:01:13 +01:00
2005-10-28 10:13:16 -07:00
2005-07-30 09:47:53 -05:00
2005-10-28 10:13:16 -07:00
2005-10-28 10:13:16 -07:00
2005-10-28 21:37:29 +01:00
2005-10-28 10:13:16 -07:00
2005-04-16 15:20:36 -07:00
2005-10-28 12:18:07 -04:00
2005-10-28 16:47:38 -07:00
2005-09-08 01:45:47 -04:00
2005-10-28 10:13:16 -07:00
2005-06-21 18:46:32 -07:00
2005-09-11 19:15:07 -07:00
2005-10-28 16:47:38 -07:00