[PATCH] Force starget->scsi_level in usb-storage scsiglue.c
From: Paul Walmsley (paul_at_booyaka.com)
Date: 11/30/05
- Previous message: Andrew Morton: "Re: [PATCH] shrinks dentry struct"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Nov 2005 19:20:38 -0700 (MST) To: mdharm-usb@one-eyed-alien.net, linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
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>
- Paul
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 4837524..4ef5527 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/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,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Andrew Morton: "Re: [PATCH] shrinks dentry struct"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [patch 1/2] USB Storage: Force starget->scsi_level in usb-storage scsiglue.c
... Otherwise, the SCSI ... layer may attempt to issue SCSI-3 commands to
the device, such as REPORT ... The enclosure reports a SCSI-3 SPC-2 command set
... (Linux-Kernel) - Re: Printer Control and Print/Preview Problems
... to be appended to the report print stream. ... or "Print" with the DoCmd.OpenReport
command, ... still open preview window. ... > following that with an OpenReport
using acNormal. ... (microsoft.public.access.reports) - Re: When RAY HADDAD Performed SEAL Tricks of the Trade
... An excerpt from Unfit for Command, ... Doug Reese, who advised the ...
action report, Jason. ... Star incident, none of them, including their one and only
member ... (misc.writing) - Re: drop down list within a query?
... I have done as suggested and i now get this message "The command or action ...
When the code window opens the cursor will be flashing between 2 ... Let's assume it is
a CustomerID number you need as criteria. ... Run the Report. ... (microsoft.public.access.queries) - Re: Report parameters and text options
... I open the report from a command button. ... If a vendor's cert expires
in three months, ... Dim TextType As Integer ... (microsoft.public.access.tablesdbdesign)