public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, paul@booyaka.com,
	mdharm-usb@one-eyed-alien.net,
	linux-usb-devel@lists.sourceforge.net
Subject: [patch 1/2] USB Storage: Force starget->scsi_level in usb-storage scsiglue.c
Date: Wed, 21 Dec 2005 14:28:06 -0800	[thread overview]
Message-ID: <20051221222806.GA9518@kroah.com> (raw)
In-Reply-To: <20051221222743.GA9501@kroah.com>


From: Paul Walmsley <paul@booyaka.com>

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,

  reply	other threads:[~2005-12-21 22:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051216185442.633779000@press.kroah.org>
2005-12-16 19:08 ` [patch 0/4] 4 patches for 2.6.15 Greg Kroah-Hartman
2005-12-16 19:08   ` [patch 1/4] i2c: Fix i2c-mv64xxx compilation error Greg Kroah-Hartman
2005-12-16 19:08   ` [patch 2/4] PCI express must be initialized before PCI hotplug Greg Kroah-Hartman
2005-12-16 19:08   ` [patch 3/4] PCI: Fix dumb bug in mmconfig fix Greg Kroah-Hartman
2005-12-16 19:09   ` [patch 4/4] UHCI: add missing memory barriers Greg Kroah-Hartman
2005-12-21 22:27 ` [patch 0/2] 2 USB patches for 2.6.15 Greg Kroah-Hartman
2005-12-21 22:28   ` Greg Kroah-Hartman [this message]
2005-12-21 22:28   ` [patch 2/2] usbcore: allow suspend/resume even if drivers don't support it Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051221222806.GA9518@kroah.com \
    --to=gregkh@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=paul@booyaka.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox