* Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
@ 2014-07-26 19:59 Laszlo T.
2014-07-27 1:50 ` Alan Stern
0 siblings, 1 reply; 6+ messages in thread
From: Laszlo T. @ 2014-07-26 19:59 UTC (permalink / raw)
To: linux-scsi; +Cc: stern
Hello,
First of all I've just subscribed the linux-scsi thread. I hope you
get my email the right way.
I have also problems with Jmicron JMS567 mobile rack.
I tried on different kernels:
3.15.5
3.16.rc6
the 'Invalid field in cdb' errors disappeared but still not ok.
I got the following errors when I ran a mkfs.ext4 command and then the
device disappeared.
Jul 26 19:54:37 debian kernel: [ 118.060026] usb 8-3: new high-speed
USB device number 2 using ehci-pci
Jul 26 19:54:37 debian kernel: [ 118.245208] usb 8-3: New USB device
found, idVendor=152d, idProduct=0567
Jul 26 19:54:37 debian kernel: [ 118.245210] usb 8-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Jul 26 19:54:37 debian kernel: [ 118.245212] usb 8-3: Product: USB to
ATA/ATAPI Bridge
Jul 26 19:54:37 debian kernel: [ 118.245213] usb 8-3: Manufacturer: JMicron
Jul 26 19:54:37 debian kernel: [ 118.245215] usb 8-3: SerialNumber:
74D781114413108
Jul 26 19:54:37 debian mtp-probe: checking bus 8, device 2:
"/sys/devices/pci0000:00/0000:00:1d.7/usb8/8-3"
Jul 26 19:54:37 debian mtp-probe: bus: 8, device: 2 was not an MTP device
Jul 26 19:54:37 debian kernel: [ 118.257932] usbcore: registered new
interface driver usb-storage
Jul 26 19:54:37 debian kernel: [ 118.259053] scsi6 : uas
Jul 26 19:54:37 debian kernel: [ 118.259178] usbcore: registered new
interface driver uas
Jul 26 19:54:37 debian kernel: [ 118.259720] scsi 6:0:0:0:
Direct-Access JMicron Generic 0114 PQ: 0 ANSI: 6
Jul 26 19:54:37 debian kernel: [ 118.260863] sd 6:0:0:0: Attached
scsi generic sg2 type 0
Jul 26 19:54:37 debian kernel: [ 118.261217] sd 6:0:0:0: [sdc]
Spinning up disk...
Jul 26 19:54:39 debian kernel: [ 119.264049] ..ready
Jul 26 19:54:39 debian kernel: [ 120.268470] sd 6:0:0:0: [sdc]
976773168 512-byte logical blocks: (500 GB/465 GiB)
Jul 26 19:54:39 debian kernel: [ 120.268472] sd 6:0:0:0: [sdc]
4096-byte physical blocks
Jul 26 19:54:39 debian kernel: [ 120.269468] sd 6:0:0:0: [sdc] Write
Protect is off
Jul 26 19:54:39 debian kernel: [ 120.269968] sd 6:0:0:0: [sdc] Write
cache: enabled, read cache: enabled, supports DPO and FUA
Jul 26 19:54:39 debian kernel: [ 120.290104] sdc: sdc1 sdc2
Jul 26 19:54:39 debian kernel: [ 120.292356] sd 6:0:0:0: [sdc]
Attached SCSI disk
Jul 26 19:56:15 debian kernel: [ 216.611696] usb 8-3: USB disconnect,
device number 2
Jul 26 19:56:15 debian kernel: [ 216.611697] sd 6:0:0:0: [sdc]
uas_submit_sense_urb ffff8800ca32ac80 tag 112, inflight: s-st a-out
a-cmd s-cmd
Jul 26 19:56:15 debian kernel: [ 216.611700] scsi host6: sense urb
submission error -19 stream 0
Jul 26 19:56:15 debian kernel: [ 216.612035] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca2f2240 tag 39, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612120] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca2f20c0 tag 40, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612185] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300dc0 tag 41, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612248] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300c40 tag 42, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612315] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300ac0 tag 43, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612377] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300940 tag 44, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612441] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca3007c0 tag 45, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612504] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300640 tag 46, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612570] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca3004c0 tag 47, inflight: CMD
Jul 26 19:56:15 debian kernel: [ 216.612633] sd 6:0:0:0: [sdc]
uas_cmd_cmplt ffff8800ca300340 tag 48, inflight: CMD
...
Jul 26 19:56:15 debian kernel: [ 216.625366] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca3277c0 tag 105, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625368] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625370] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca327640 tag 106, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625371] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625373] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca3274c0 tag 107, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625375] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625377] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca327340 tag 108, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625378] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625380] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca3271c0 tag 109, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625382] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625384] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca327040 tag 110, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625385] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625387] sd 6:0:0:0: [sdc]
uas_zap_dead ffff8800ca32ae00 tag 111, inflight: CMD abort
Jul 26 19:56:15 debian kernel: [ 216.625389] sd 6:0:0:0: [sdc] abort completed
Jul 26 19:56:15 debian kernel: [ 216.625412] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.625414] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.625416] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.625417] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.625419] Write(10): 2a 00 00 04
08 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.625555] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.625622] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.625698] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.625790] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.625950] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626013] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626077] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626140] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626204] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626268] lost page write due to
I/O error on sdc2
Jul 26 19:56:15 debian kernel: [ 216.626659] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.626662] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.626662] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.626663] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.626664] Write(10): 2a 00 00 04
0c 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.626790] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.626792] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.626793] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.626794] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.626795] Write(10): 2a 00 00 04
10 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.626924] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.626925] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.626926] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.626928] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.626928] Write(10): 2a 00 00 04
14 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.627059] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.627061] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.627062] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.627063] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.627064] Write(10): 2a 00 00 04
18 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.627195] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.627196] sd 6:0:0:0: [sdc]
Jul 26 19:56:15 debian kernel: [ 216.627197] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 26 19:56:15 debian kernel: [ 216.627199] sd 6:0:0:0: [sdc] CDB:
Jul 26 19:56:15 debian kernel: [ 216.627199] Write(10): 2a 00 00 04
1c 00 00 04 00 00
Jul 26 19:56:15 debian kernel: [ 216.627327] sd 6:0:0:0: [sdc]
Unhandled error code
Jul 26 19:56:15 debian kernel: [ 216.627328] sd 6:0:0:0: [sdc]
lsusb:
Bus 008 Device 002: ID 152d:0567 JMicron Technology Corp. / JMicron
USA Technology Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x152d JMicron Technology Corp. / JMicron USA
Technology Corp.
idProduct 0x0567
bcdDevice 1.14
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 85
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xc0
Self Powered
MaxPower 30mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 6
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 4
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 98
iInterface 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Command pipe (0x01)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Status pipe (0x02)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Data-in pipe (0x03)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Data-out pipe (0x04)
What can the problem be?
Thanks,
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
2014-07-26 19:59 [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag Laszlo T.
@ 2014-07-27 1:50 ` Alan Stern
2014-07-27 21:04 ` Laszlo T.
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2014-07-27 1:50 UTC (permalink / raw)
To: Laszlo T.; +Cc: linux-scsi
On Sat, 26 Jul 2014, Laszlo T. wrote:
> Hello,
>
> First of all I've just subscribed the linux-scsi thread. I hope you
> get my email the right way.
>
> I have also problems with Jmicron JMS567 mobile rack.
>
> I tried on different kernels:
> 3.15.5
> 3.16.rc6
> the 'Invalid field in cdb' errors disappeared but still not ok.
Since your device uses the uas driver, you might get more help on the
linux-usb mailing list. (You don't have to subscribe to the list in
order to post to it.)
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
2014-07-27 1:50 ` Alan Stern
@ 2014-07-27 21:04 ` Laszlo T.
0 siblings, 0 replies; 6+ messages in thread
From: Laszlo T. @ 2014-07-27 21:04 UTC (permalink / raw)
To: Alan Stern; +Cc: linux-scsi
2014-07-27 3:50 GMT+02:00 Alan Stern <stern@rowland.harvard.edu>:
> On Sat, 26 Jul 2014, Laszlo T. wrote:
>
>> Hello,
>>
>> First of all I've just subscribed the linux-scsi thread. I hope you
>> get my email the right way.
>>
>> I have also problems with Jmicron JMS567 mobile rack.
>>
>> I tried on different kernels:
>> 3.15.5
>> 3.16.rc6
>> the 'Invalid field in cdb' errors disappeared but still not ok.
>
> Since your device uses the uas driver, you might get more help on the
> linux-usb mailing list. (You don't have to subscribe to the list in
> order to post to it.)
>
> Alan Stern
>
Thank you, I will email them.
In the meantime, is there any alternate solution to use this mobile rack?
I tried to backlist the uas driver on 3.16.rc6 but in that case the
/dev/sd* file wasn't created.
and also tried to disable fua (libata fua=0) on 3.14 kernel, but I got
the 'Invalid field in cdb' errors.
Br,
Laszlo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
[not found] ` <Pine.LNX.4.44L0.1406301115010.1550-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2014-06-30 16:28 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2014-06-30 16:28 UTC (permalink / raw)
To: Alan Stern
Cc: Michael Büsch, James Bottomley, Bryn M. Reeves,
Matthew Dharm, SCSI development list, USB list, USB Storage list
On Mon, Jun 30, 2014 at 11:16:51AM -0400, Alan Stern wrote:
> On Mon, 30 Jun 2014, Alan Stern wrote:
>
> > Some buggy JMicron USB-ATA bridges don't know how to translate the FUA
> > bit in READs or WRITEs. This patch adds an entry in unusual_devs.h
> > and a blacklist flag to tell the sd driver not to use FUA.
> >
> > Signed-off-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
> > Reported-by: Michael Büsch <m@bues.ch>
> > Tested-by: Michael Büsch <m@bues.ch>
> > Acked-by: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
> > CC: Matthew Dharm <mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe@public.gmane.org>
> > CC: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
>
> Greg:
>
> I forgot to add your name to the recipient list on this patch. Since
> James has already Ack'ed it, would you like to take it for your USB
> tree?
Sure, I can take it, thanks.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
2014-06-30 15:04 ` [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag Alan Stern
@ 2014-06-30 15:16 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1406301115010.1550-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2014-06-30 15:16 UTC (permalink / raw)
To: Greg KH
Cc: Michael Büsch, James Bottomley, Bryn M. Reeves,
Matthew Dharm, SCSI development list, USB list, USB Storage list
On Mon, 30 Jun 2014, Alan Stern wrote:
> Some buggy JMicron USB-ATA bridges don't know how to translate the FUA
> bit in READs or WRITEs. This patch adds an entry in unusual_devs.h
> and a blacklist flag to tell the sd driver not to use FUA.
>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> Reported-by: Michael Büsch <m@bues.ch>
> Tested-by: Michael Büsch <m@bues.ch>
> Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
> CC: <stable@vger.kernel.org>
Greg:
I forgot to add your name to the recipient list on this patch. Since
James has already Ack'ed it, would you like to take it for your USB
tree?
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag
2014-06-27 19:52 [usb-storage] Re: External USB3 disk fails with "Invalid field in cdb" Michael Büsch
@ 2014-06-30 15:04 ` Alan Stern
2014-06-30 15:16 ` Alan Stern
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2014-06-30 15:04 UTC (permalink / raw)
To: Michael Büsch
Cc: James Bottomley, Bryn M. Reeves, Matthew Dharm,
SCSI development list, USB list, USB Storage list
Some buggy JMicron USB-ATA bridges don't know how to translate the FUA
bit in READs or WRITEs. This patch adds an entry in unusual_devs.h
and a blacklist flag to tell the sd driver not to use FUA.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Michael Büsch <m@bues.ch>
Tested-by: Michael Büsch <m@bues.ch>
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
CC: <stable@vger.kernel.org>
---
[as1751]
drivers/scsi/sd.c | 5 ++++-
drivers/usb/storage/scsiglue.c | 4 ++++
drivers/usb/storage/unusual_devs.h | 7 +++++++
include/linux/usb_usual.h | 4 +++-
include/scsi/scsi_device.h | 1 +
5 files changed, 19 insertions(+), 2 deletions(-)
Index: usb-3.16/include/linux/usb_usual.h
===================================================================
--- usb-3.16.orig/include/linux/usb_usual.h
+++ usb-3.16/include/linux/usb_usual.h
@@ -70,7 +70,9 @@
US_FLAG(NEEDS_CAP16, 0x00400000) \
/* cannot handle READ_CAPACITY_10 */ \
US_FLAG(IGNORE_UAS, 0x00800000) \
- /* Device advertises UAS but it is broken */
+ /* Device advertises UAS but it is broken */ \
+ US_FLAG(BROKEN_FUA, 0x01000000) \
+ /* Cannot handle FUA in WRITE or READ CDBs */ \
#define US_FLAG(name, value) US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
Index: usb-3.16/include/scsi/scsi_device.h
===================================================================
--- usb-3.16.orig/include/scsi/scsi_device.h
+++ usb-3.16/include/scsi/scsi_device.h
@@ -173,6 +173,7 @@ struct scsi_device {
unsigned is_visible:1; /* is the device visible in sysfs */
unsigned wce_default_on:1; /* Cache is ON by default */
unsigned no_dif:1; /* T10 PI (DIF) should be disabled */
+ unsigned broken_fua:1; /* Don't set FUA bit */
atomic_t disk_events_disable_depth; /* disable depth for disk events */
Index: usb-3.16/drivers/usb/storage/unusual_devs.h
===================================================================
--- usb-3.16.orig/drivers/usb/storage/unusual_devs.h
+++ usb-3.16/drivers/usb/storage/unusual_devs.h
@@ -1936,6 +1936,13 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE ),
+/* Reported by Michael Büsch <m@bues.ch> */
+UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114,
+ "JMicron",
+ "USB to ATA/ATAPI Bridge",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ US_FL_BROKEN_FUA ),
+
/* Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* JMicron responds to USN and several other SCSI ioctls with a
* residue that causes subsequent I/O requests to fail. */
Index: usb-3.16/drivers/usb/storage/scsiglue.c
===================================================================
--- usb-3.16.orig/drivers/usb/storage/scsiglue.c
+++ usb-3.16/drivers/usb/storage/scsiglue.c
@@ -256,6 +256,10 @@ static int slave_configure(struct scsi_d
if (us->fflags & US_FL_WRITE_CACHE)
sdev->wce_default_on = 1;
+ /* A few buggy USB-ATA bridges don't understand FUA */
+ if (us->fflags & US_FL_BROKEN_FUA)
+ sdev->broken_fua = 1;
+
} else {
/* Non-disk-type devices don't need to blacklist any pages
Index: usb-3.16/drivers/scsi/sd.c
===================================================================
--- usb-3.16.orig/drivers/scsi/sd.c
+++ usb-3.16/drivers/scsi/sd.c
@@ -2441,7 +2441,10 @@ sd_read_cache_type(struct scsi_disk *sdk
}
sdkp->DPOFUA = (data.device_specific & 0x10) != 0;
- if (sdkp->DPOFUA && !sdkp->device->use_10_for_rw) {
+ if (sdp->broken_fua) {
+ sd_first_printk(KERN_NOTICE, sdkp, "Disabling FUA\n");
+ sdkp->DPOFUA = 0;
+ } else if (sdkp->DPOFUA && !sdkp->device->use_10_for_rw) {
sd_first_printk(KERN_NOTICE, sdkp,
"Uses READ/WRITE(6), disabling FUA\n");
sdkp->DPOFUA = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-27 21:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-26 19:59 [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag Laszlo T.
2014-07-27 1:50 ` Alan Stern
2014-07-27 21:04 ` Laszlo T.
-- strict thread matches above, loose matches on Subject: below --
2014-06-27 19:52 [usb-storage] Re: External USB3 disk fails with "Invalid field in cdb" Michael Büsch
2014-06-30 15:04 ` [PATCH] usb-storage/SCSI: Add broken_fua blacklist flag Alan Stern
2014-06-30 15:16 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1406301115010.1550-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-06-30 16:28 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.