tree 84d19df1b2730435254d7b005ca80fd715ba567c
parent 34008dbfe8c00eca67f97bad484eb5cb03bafe66
author Matthew Dharm <[EMAIL PROTECTED]> Fri, 29 Jul 2005 04:50:29 -0700
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 09 Sep 2005 06:22:55 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Matthew Dharm <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 drivers/usb/storage/scsiglue.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -156,6 +156,14 @@ static int slave_configure(struct scsi_d
                if (us->flags & US_FL_FIX_CAPACITY)
                        sdev->fix_capacity = 1;
+               /* Some devices report a SCSI revision level above 2 but are
+                * unable to handle the REPORT LUNS command (for which
+                * support is mandatory at level 3).  Since we already have
+                * a Get-Max-LUN request, we won't lose much by setting the
+                * revision level down to 2.  The only devices that would be
+                * affected are those with sparse LUNs. */
+               sdev->scsi_level = SCSI_2;
                /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable
                 * Hardware Error) when any low-level error occurs,
                 * recoverable or not.  Setting this flag tells the SCSI
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to