aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorMatthew Dharm <mdharm-usb@one-eyed-alien.net>2005-07-28 17:50:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 19:22:55 -0400
commita4e628328ec60873fec9d506d682155391f589ce (patch)
tree84d19df1b2730435254d7b005ca80fd715ba567c /drivers/usb/storage
parent34008dbfe8c00eca67f97bad484eb5cb03bafe66 (diff)
[PATCH] USB Storage: wedge SCSI revision at 2 for usb-storage devices
This patch started life as as479b, and has been rediffed. Please note the order of submission of this latest patch series -- even tho this has an older original number, it is the last patch I'll be sending today. This patch changes the reported SCSI revision level to 2 for all disk-type devices. This is needed in a few cases because the device reports a level of 3 or higher but then crashes when given a REPORT LUNS command (for which support is supposed to be mandatory at those levels). This shouldn't harm us, since it only matters for sparse LUNs and we have separate ways of coping with that. 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>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/scsiglue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index af294bb68c35..d34dc9f417f0 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -156,6 +156,14 @@ static int slave_configure(struct scsi_device *sdev)
156 if (us->flags & US_FL_FIX_CAPACITY) 156 if (us->flags & US_FL_FIX_CAPACITY)
157 sdev->fix_capacity = 1; 157 sdev->fix_capacity = 1;
158 158
159 /* Some devices report a SCSI revision level above 2 but are
160 * unable to handle the REPORT LUNS command (for which
161 * support is mandatory at level 3). Since we already have
162 * a Get-Max-LUN request, we won't lose much by setting the
163 * revision level down to 2. The only devices that would be
164 * affected are those with sparse LUNs. */
165 sdev->scsi_level = SCSI_2;
166
159 /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable 167 /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable
160 * Hardware Error) when any low-level error occurs, 168 * Hardware Error) when any low-level error occurs,
161 * recoverable or not. Setting this flag tells the SCSI 169 * recoverable or not. Setting this flag tells the SCSI