aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-12-21 14:40:50 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-12-21 14:40:50 -0800
commit84740ccd39234c69c8b9fca6a90dbbcd2fa7fdb4 (patch)
tree71bf22a1aa6e68ad5c9978721a99e0ab46411486 /usb
parent52d58c53a7c34e50366724676fb3d4bbc547df79 (diff)
downloadpatches-84740ccd39234c69c8b9fca6a90dbbcd2fa7fdb4.tar.gz
usb patch
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-storage-force-starget-scsi_level-in-usb-storage-scsiglue.c.patch51
-rw-r--r--usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch6
2 files changed, 54 insertions, 3 deletions
diff --git a/usb/usb-storage-force-starget-scsi_level-in-usb-storage-scsiglue.c.patch b/usb/usb-storage-force-starget-scsi_level-in-usb-storage-scsiglue.c.patch
new file mode 100644
index 0000000000000..f941d64fb6390
--- /dev/null
+++ b/usb/usb-storage-force-starget-scsi_level-in-usb-storage-scsiglue.c.patch
@@ -0,0 +1,51 @@
+From paul@booyaka.com Tue Nov 29 19:20:38 2005
+Date: Tue, 29 Nov 2005 19:20:38 -0700 (MST)
+From: Paul Walmsley <paul@booyaka.com>
+To: <mdharm-usb@one-eyed-alien.net>
+Subject: USB Storage: Force starget->scsi_level in usb-storage scsiglue.c
+
+When the usb-storage module forces sdev->scsi_level to SCSI_2, it should
+also force starget->scsi_level to the same value. Otherwise, the SCSI
+layer may attempt to issue SCSI-3 commands to the device, such as REPORT
+LUNS, which it cannot handle. This can prevent the device from working
+with Linux.
+
+The AMS Venus DS3 DS2316SU2S SATA-to-SATA+USB enclosure, based on the
+Oxford Semiconductor OXU921S chip, requires this patch to function
+correctly on Linux. The enclosure reports a SCSI-3 SPC-2 command set
+level, but does not correctly handle the REPORT LUNS SCSI command -
+probably due to a bug in its firmware.
+
+It seems likely that other USB storage enclosures with similar bugs will
+also benefit from this patch.
+
+Tony Lindgren <tony@atomide.com> collaborated in the development of this
+patch.
+
+Signed-off-by: Paul Walmsley <paul@booyaka.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/scsiglue.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/storage/scsiglue.c
++++ gregkh-2.6/drivers/usb/storage/scsiglue.c
+@@ -109,7 +109,7 @@ static int slave_configure(struct scsi_d
+ * data comes from.
+ */
+ if (sdev->scsi_level < SCSI_2)
+- sdev->scsi_level = SCSI_2;
++ sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
+
+ /* According to the technical support people at Genesys Logic,
+ * devices using their chips have problems transferring more than
+@@ -162,7 +162,7 @@ static int slave_configure(struct scsi_d
+ * 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;
++ sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
+
+ /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable
+ * Hardware Error) when any low-level error occurs,
diff --git a/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch b/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch
index 748fe58b7263f..79014e0ce82a7 100644
--- a/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch
+++ b/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch
@@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- gregkh-2.6.orig/drivers/usb/core/usb.c
+++ gregkh-2.6/drivers/usb/core/usb.c
-@@ -1029,7 +1029,8 @@ static int usb_generic_suspend(struct de
+@@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct de
mark_quiesced(intf);
} else {
// FIXME else if there's no suspend method, disconnect...
@@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
status = 0;
}
return status;
-@@ -1057,8 +1058,10 @@ static int usb_generic_resume(struct dev
+@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct dev
}
if ((dev->driver == NULL) ||
@@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
intf = to_usb_interface(dev);
driver = to_usb_driver(dev->driver);
-@@ -1078,7 +1081,7 @@ static int usb_generic_resume(struct dev
+@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct dev
mark_quiesced(intf);
}
} else