Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313683

[PATCH 4.1 05/43] usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.1 05/43] usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron
Date 2016-01-21 00:30 +0100
Message-ID <qTamm-53Q-13@gated-at.bofh.it> (permalink)
References <qTacF-4ZC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dmitry Katsubo <dmitry.katsubo@gmail.com>

commit 9fa62b1a31c96715aef34f25000e882ed4ac4876 upstream.

The patch extends the family of SATA-to-USB JMicron adapters that need
FUA to be disabled and applies the same policy for uas driver.
See details in http://unix.stackexchange.com/questions/237204/

Signed-off-by: Dmitry Katsubo <dmitry.katsubo@gmail.com>
Tested-by: Dmitry Katsubo <dmitry.katsubo@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/storage/uas.c          |    4 ++++
 drivers/usb/storage/unusual_devs.h |    2 +-
 drivers/usb/storage/unusual_uas.h  |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -796,6 +796,10 @@ static int uas_slave_configure(struct sc
 	if (devinfo->flags & US_FL_NO_REPORT_OPCODES)
 		sdev->no_report_opcodes = 1;
 
+	/* A few buggy USB-ATA bridges don't understand FUA */
+	if (devinfo->flags & US_FL_BROKEN_FUA)
+		sdev->broken_fua = 1;
+
 	scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
 	return 0;
 }
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1987,7 +1987,7 @@ UNUSUAL_DEV(  0x14cd, 0x6600, 0x0201, 0x
 		US_FL_IGNORE_RESIDUE ),
 
 /* Reported by Michael BÃŒsch <m@bues.ch> */
-UNUSUAL_DEV(  0x152d, 0x0567, 0x0114, 0x0114,
+UNUSUAL_DEV(  0x152d, 0x0567, 0x0114, 0x0116,
 		"JMicron",
 		"USB to ATA/ATAPI Bridge",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -132,7 +132,7 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x99
 		"JMicron",
 		"JMS567",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
-		US_FL_NO_REPORT_OPCODES),
+		US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
 
 /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
 UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.1 00/43] 4.1.16-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 40/43] KEYS: Fix race between key destruction and finding a keyring by name Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 25/43] sh_eth: fix kernel oops in skb_put() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 39/43] rhashtable: Fix walker list corruption Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 31/43] net_sched: make qdisc_tree_decrease_qlen() work for non mq Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 37/43] af_unix: Revert lock_interruptible in stream receive code Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 20/43] sctp: also copy sk_tsflags when copying the socket Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:20 +0100
  [PATCH 4.1 11/43] usb: core : hub: Fix BOS NULL pointer kernel panic Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 05/43] usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 15/43] atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 10/43] usb: musb: USB_TI_CPPI41_DMA requires dmaengine support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 04/43] USB: serial: Another Infineon flash loader USB ID Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 01/43] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 07/43] USB: add quirk for devices with broken LPM Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 12/43] usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 13/43] pppoe: fix memory corruption in padt work structure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 06/43] USB: cp210x: Remove CP2110 ID from compatibility list Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 17/43] vxlan: fix incorrect RCO bit in VXLAN header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 14/43] gre6: allow to update all parameters via rtnl Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  [PATCH 4.1 03/43] USB: cdc_acm: Ignore Infineon Flash Loader utility Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-21 00:30 +0100
  Re: [PATCH 4.1 00/43] 4.1.16-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-01-21 01:00 +0100
  Re: [PATCH 4.1 00/43] 4.1.16-stable review Guenter Roeck <linux@roeck-us.net> - 2016-01-21 13:30 +0100

csiph-web