All of lore.kernel.org
 help / color / mirror / Atom feed
* JMS56x not working reliably with uas driver
@ 2016-12-21 11:39 George Cherian
  2016-12-21 11:42 ` Oliver Neukum
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: George Cherian @ 2016-12-21 11:39 UTC (permalink / raw)
  To: oneukum; +Cc: linux-scsi, linux-usb, hdegoede, stern

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

Hi Oliver,

I was working with this JMicron device and using the uas driver.
I am seeing the following 2 issues.

1) On connect I see the following messages.
xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or 
incorrect stream ring
  This was eliminated using the following scissor patch.

---------------------------------8<------------------------------------
[PATCH] usb: storage: unusual_uas: Add JMicron JMS56x to unusual device

This device gives the following error on detection.
xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or 
incorrect stream ring

The same error is not seen when it is added to unusual_device
list with US_FL_NO_REPORT_OPCODES passed.

Signed-off-by: George Cherian <george.cherian@cavium.com>
---
  drivers/usb/storage/unusual_uas.h | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/drivers/usb/storage/unusual_uas.h 
b/drivers/usb/storage/unusual_uas.h
index cbea9f3..d292299 100644
--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -142,6 +142,13 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
  		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
  		US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),

+/* Reported-by George Cherian <george.cherian@cavium.com> */
+UNUSUAL_DEV(0x152d, 0x9561, 0x0000, 0x9999,
+                "JMicron",
+                "JMS56x",
+                USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+                US_FL_NO_REPORT_OPCODES),
+
  /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
  UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
  		"VIA",
--------------------------------->8------------------------------------

2) On disconnect I am seeing the following issue

  scsi host4: uas_post_reset: alloc streams error -19 after reset
  sd 4:0:0:0: [sdb] Synchronizing SCSI cache

This is more fatal because after these messages the USB port becomes 
unusable. Even an lsusb invocation hangs for ever.

Also please note that the device works fine with usb-storage driver.
I am attaching the usbmon capture of disconnect using uas and 
usb-storage driver.

Any help in this regard is highly appreciated.

Regards,
-George

[-- Attachment #2: uas_disconnect.txt --]
[-- Type: text/plain, Size: 2971 bytes --]

ffff801f5efb8a00 57530621 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57530654 S Ii:4:002:1 -115:128 2 <
ffff801f61285a00 57530677 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57531618 C Ci:4:002:0 0 4 = c1024000
ffff801f61285a00 57531634 S Co:4:002:0 s 23 01 0019 0003 0000 0
ffff801f61285a00 57531992 C Co:4:002:0 0 0
ffff801f61285a00 57532225 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57533010 C Ci:4:002:0 0 4 = c1020000
ffff801f61285a00 57533022 S Co:4:002:0 s 23 03 001c 0003 0000 0
ffff801f61285a00 57533405 C Co:4:002:0 0 0
ffff801f61285a00 57553165 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57554174 C Ci:4:002:0 0 4 = b1020000
ffff801f61285a00 57573164 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57574064 C Ci:4:002:0 0 4 = b1020000
ffff801f61285a00 57593169 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57594214 C Ci:4:002:0 0 4 = b1020000
ffff801f5efb8a00 57642612 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57642621 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57658612 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57658618 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57674611 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57674617 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57690610 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57690615 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57706609 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57706615 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57722609 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57722614 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57738611 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57738616 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57754610 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57754615 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57770607 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57770612 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57786609 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57786614 S Ii:4:002:1 -115:128 2 <
ffff801f5efb8a00 57802608 C Ii:4:002:1 0:128 1 = 08
ffff801f5efb8a00 57802613 S Ii:4:002:1 -115:128 2 <
ffff801f61285a00 57803198 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57804109 C Ci:4:002:0 0 4 = a0020100
ffff801f61285a00 57804122 S Co:4:002:0 s 23 01 0014 0003 0000 0
ffff801f61285a00 57804539 C Co:4:002:0 0 0
ffff801f61285a00 57804553 S Co:4:002:0 s 23 01 001d 0003 0000 0
ffff801f61285a00 57804876 C Co:4:002:0 0 0
ffff801f61285a00 57804890 S Co:4:002:0 s 23 01 0019 0003 0000 0
ffff801f61285a00 57805185 C Co:4:002:0 0 0
ffff801f61285a00 57805199 S Co:4:002:0 s 23 01 0010 0003 0000 0
ffff801f61285a00 57805735 C Co:4:002:0 0 0
ffff801f61285a00 57805749 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57806491 C Ci:4:002:0 0 4 = a0020000
ffff801f61285a00 57806506 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57806895 C Ci:4:002:0 0 4 = a0020000
ffff801f61285a00 57806910 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801f61285a00 57807355 C Ci:4:002:0 0 4 = a0020000 

[-- Attachment #3: usb_storage_disconnect.txt --]
[-- Type: text/plain, Size: 1074 bytes --]

ffff801fde9b7100 2508261441 C Ii:4:002:1 0:128 1 = 08
ffff801fde9b7100 2508261475 S Ii:4:002:1 -115:128 2 <
ffff801fdaf84200 2508261591 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf84200 2508262561 C Ci:4:002:0 0 4 = a0024100
ffff801fdaf84200 2508262596 S Co:4:002:0 s 23 01 0010 0003 0000 0
ffff801fdaf84200 2508263060 C Co:4:002:0 0 0
ffff801fdaf84200 2508263118 S Co:4:002:0 s 23 01 0019 0003 0000 0
ffff801fdaf84200 2508263569 C Co:4:002:0 0 0
ffff801fdaf84e00 2508303619 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf84e00 2508304568 C Ci:4:002:0 0 4 = a0020000
ffff801fdaf8cb00 2508343090 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf8cb00 2508344057 C Ci:4:002:0 0 4 = a0020000
ffff801fdaf8cb00 2508383090 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf8cb00 2508384002 C Ci:4:002:0 0 4 = a0020000
ffff801fdaf8cb00 2508423124 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf8cb00 2508424178 C Ci:4:002:0 0 4 = a0020000
ffff801fdaf8cb00 2508463093 S Ci:4:002:0 s a3 00 0000 0003 0004 4 <
ffff801fdaf8cb00 2508463992 C Ci:4:002:0 0 4 = a0020000

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 11:39 JMS56x not working reliably with uas driver George Cherian
@ 2016-12-21 11:42 ` Oliver Neukum
       [not found]   ` <1482320547.7638.7.camel-IBi9RG/b67k@public.gmane.org>
  2016-12-21 12:07   ` George Cherian
  2016-12-21 11:50 ` Hans de Goede
       [not found] ` <585A69E6.6040009-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  2 siblings, 2 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-21 11:42 UTC (permalink / raw)
  To: George Cherian; +Cc: hdegoede, stern, linux-scsi, linux-usb

On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
> Hi Oliver,
> 
> I was working with this JMicron device and using the uas driver.
> I am seeing the following 2 issues.
> 
> 1) On connect I see the following messages.

Thanks. Do you want to submit it to Greg?
The patch is fine.

> 2) On disconnect I am seeing the following issue
> 
>   scsi host4: uas_post_reset: alloc streams error -19 after reset
>   sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> 
> This is more fatal because after these messages the USB port becomes 
> unusable. Even an lsusb invocation hangs for ever.

Ouch. That points to a logic error. We should not reset if
a device is gone.
Could you send dmesg of such a case?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 11:39 JMS56x not working reliably with uas driver George Cherian
  2016-12-21 11:42 ` Oliver Neukum
@ 2016-12-21 11:50 ` Hans de Goede
       [not found] ` <585A69E6.6040009-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  2 siblings, 0 replies; 22+ messages in thread
From: Hans de Goede @ 2016-12-21 11:50 UTC (permalink / raw)
  To: George Cherian, oneukum; +Cc: linux-scsi, linux-usb, stern

Hi,

On 21-12-16 12:39, George Cherian wrote:
> Hi Oliver,
>
> I was working with this JMicron device and using the uas driver.
> I am seeing the following 2 issues.
>
> 1) On connect I see the following messages.
> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or incorrect stream ring
>  This was eliminated using the following scissor patch.
>
> ---------------------------------8<------------------------------------
> [PATCH] usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
>
> This device gives the following error on detection.
> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or incorrect stream ring
>
> The same error is not seen when it is added to unusual_device
> list with US_FL_NO_REPORT_OPCODES passed.
>
> Signed-off-by: George Cherian <george.cherian@cavium.com>
> ---
>  drivers/usb/storage/unusual_uas.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
> index cbea9f3..d292299 100644
> --- a/drivers/usb/storage/unusual_uas.h
> +++ b/drivers/usb/storage/unusual_uas.h
> @@ -142,6 +142,13 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
>          USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>          US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
>
> +/* Reported-by George Cherian <george.cherian@cavium.com> */
> +UNUSUAL_DEV(0x152d, 0x9561, 0x0000, 0x9999,
> +                "JMicron",
> +                "JMS56x",
> +                USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> +                US_FL_NO_REPORT_OPCODES),
> +
>  /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
>  UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
>          "VIA",
> --------------------------------->8------------------------------------
>
> 2) On disconnect I am seeing the following issue
>
>  scsi host4: uas_post_reset: alloc streams error -19 after reset
>  sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>
> This is more fatal because after these messages the USB port becomes unusable. Even an lsusb invocation hangs for ever.
>
> Also please note that the device works fine with usb-storage driver.
> I am attaching the usbmon capture of disconnect using uas and usb-storage driver.
>
> Any help in this regard is highly appreciated.

Are you still seeen this second problem with the first patch applied ? Is this after
an actual disconnect, or after the kernel seeing a disconnect without the device
being actually disconnected.

This second problem sounds like it is an issue with your xhci controller. Can you
try this on another motherboard (with another xhci controller) ?

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 11:54     ` Hans de Goede
@ 2016-12-21 11:54       ` Oliver Neukum
  0 siblings, 0 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-21 11:54 UTC (permalink / raw)
  To: Hans de Goede; +Cc: George Cherian, stern, linux-scsi, linux-usb

On Wed, 2016-12-21 at 12:54 +0100, Hans de Goede wrote:
> Hi,
> 
> On 21-12-16 12:42, Oliver Neukum wrote:
> > On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
> >> Hi Oliver,
> >>
> >> I was working with this JMicron device and using the uas driver.
> >> I am seeing the following 2 issues.
> >>
> >> 1) On connect I see the following messages.
> >
> > Thanks. Do you want to submit it to Greg?
> > The patch is fine.
> >
> >> 2) On disconnect I am seeing the following issue
> >>
> >>   scsi host4: uas_post_reset: alloc streams error -19 after reset
> >>   sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> >>
> >> This is more fatal because after these messages the USB port becomes
> >> unusable. Even an lsusb invocation hangs for ever.
> >
> > Ouch. That points to a logic error. We should not reset if
> > a device is gone.
> 
> Ah good point, so instead of just seeing a disconnect, something
> is triggering a reset, and then we try to alloc stream on the
> disconnected usb port and that apparently makes the xhci controller
> quite unhappy.

It is problematic because there is a window we cannot avoid.
This needs a full dmesg to say anything more about it.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]   ` <1482320547.7638.7.camel-IBi9RG/b67k@public.gmane.org>
@ 2016-12-21 11:54     ` Hans de Goede
  2016-12-21 11:54       ` Oliver Neukum
  0 siblings, 1 reply; 22+ messages in thread
From: Hans de Goede @ 2016-12-21 11:54 UTC (permalink / raw)
  To: Oliver Neukum, George Cherian
  Cc: stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi,

On 21-12-16 12:42, Oliver Neukum wrote:
> On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
>> Hi Oliver,
>>
>> I was working with this JMicron device and using the uas driver.
>> I am seeing the following 2 issues.
>>
>> 1) On connect I see the following messages.
>
> Thanks. Do you want to submit it to Greg?
> The patch is fine.
>
>> 2) On disconnect I am seeing the following issue
>>
>>   scsi host4: uas_post_reset: alloc streams error -19 after reset
>>   sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>
>> This is more fatal because after these messages the USB port becomes
>> unusable. Even an lsusb invocation hangs for ever.
>
> Ouch. That points to a logic error. We should not reset if
> a device is gone.

Ah good point, so instead of just seeing a disconnect, something
is triggering a reset, and then we try to alloc stream on the
disconnected usb port and that apparently makes the xhci controller
quite unhappy.

Regards,

Hans
--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 11:42 ` Oliver Neukum
       [not found]   ` <1482320547.7638.7.camel-IBi9RG/b67k@public.gmane.org>
@ 2016-12-21 12:07   ` George Cherian
  2016-12-21 12:12     ` Oliver Neukum
  2016-12-21 12:20     ` Hans de Goede
  1 sibling, 2 replies; 22+ messages in thread
From: George Cherian @ 2016-12-21 12:07 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: hdegoede, stern, linux-scsi, linux-usb



On 12/21/2016 05:12 PM, Oliver Neukum wrote:
> On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
>> Hi Oliver,
>>
>> I was working with this JMicron device and using the uas driver.
>> I am seeing the following 2 issues.
>>
>> 1) On connect I see the following messages.
>
> Thanks. Do you want to submit it to Greg?
> The patch is fine.
Yes please!!!

>
>> 2) On disconnect I am seeing the following issue
>>
>>    scsi host4: uas_post_reset: alloc streams error -19 after reset
>>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>
>> This is more fatal because after these messages the USB port becomes
>> unusable. Even an lsusb invocation hangs for ever.
>
> Ouch. That points to a logic error. We should not reset if
> a device is gone.
> Could you send dmesg of such a case?
here is the dmesg!!
[  203.475382] usb 4-1.3: new SuperSpeed USB device number 3 using xhci_hcd
[  203.496172] usb 4-1.3: New USB device found, idVendor=152d, 
idProduct=9561
[  203.503037] usb 4-1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=5
[  203.510352] usb 4-1.3: Product: JMS56x Series
[  203.514698] usb 4-1.3: Manufacturer: JMicron
[  203.518966] usb 4-1.3: SerialNumber: 00000000000000000000
[  203.594383] usbcore: registered new interface driver usb-storage
[  203.612425] scsi host4: uas
[  203.615418] usbcore: registered new interface driver uas
[  203.620979] scsi 4:0:0:0: Direct-Access     ST4000NM 0033-9ZM170 
  0001 PQ: 0 ANSI: 6
[  203.630240] sd 4:0:0:0: Attached scsi generic sg1 type 0
[  203.630382] sd 4:0:0:0: [sdb] 7814037168 512-byte logical blocks: 
(4.00 TB/3.63 TiB)
[  203.631338] sd 4:0:0:0: [sdb] Write Protect is off
[  203.631342] sd 4:0:0:0: [sdb] Mode Sense: 67 00 10 08
[  203.631734] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: 
enabled, supports DPO and FUA
[  203.631899] xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled 
endpoint or incorrect stream ring
[  203.631904] xhci_hcd 0000:00:11.0: @0000001f610a1c10 00000000 
00000000 1b000000 03078001 state 14 ep_info 9403
[  203.631906] xhci_hcd 0000:00:11.0: No epring
[  203.674546]  sdb: sdb1
[  203.676639] sd 4:0:0:0: [sdb] Attached SCSI disk
[  213.222913] scsi host4: uas_post_reset: alloc streams error -19 after 
reset
[  213.230548] sd 4:0:0:0: [sdb] Synchronizing SCSI cache

Above is the dmesg without the unusual_uas patch applied.
Do you need me to enable any specific dev_dbg and then the dmesg output?

>
> 	Regards
> 		Oliver
>
>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 12:07   ` George Cherian
@ 2016-12-21 12:12     ` Oliver Neukum
  2016-12-21 12:20     ` Hans de Goede
  1 sibling, 0 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-21 12:12 UTC (permalink / raw)
  To: George Cherian; +Cc: hdegoede, stern, linux-scsi, linux-usb

On Wed, 2016-12-21 at 17:37 +0530, George Cherian wrote:
> 
> On 12/21/2016 05:12 PM, Oliver Neukum wrote:
> > On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
> >> Hi Oliver,
> >>
> >> I was working with this JMicron device and using the uas driver.
> >> I am seeing the following 2 issues.
> >>
> >> 1) On connect I see the following messages.
> >
> > Thanks. Do you want to submit it to Greg?
> > The patch is fine.
> Yes please!!!

So you want me to submit it?
It would be your chance to get a patch upstream.

> >> 2) On disconnect I am seeing the following issue
> >>
> >>    scsi host4: uas_post_reset: alloc streams error -19 after reset
> >>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> >>
> >> This is more fatal because after these messages the USB port becomes
> >> unusable. Even an lsusb invocation hangs for ever.
> >
> > Ouch. That points to a logic error. We should not reset if
> > a device is gone.
> > Could you send dmesg of such a case?
> here is the dmesg!!
> [  203.475382] usb 4-1.3: new SuperSpeed USB device number 3 using xhci_hcd
> [  203.496172] usb 4-1.3: New USB device found, idVendor=152d, 
> idProduct=9561
> [  203.503037] usb 4-1.3: New USB device strings: Mfr=1, Product=2, 
> SerialNumber=5
> [  203.510352] usb 4-1.3: Product: JMS56x Series
> [  203.514698] usb 4-1.3: Manufacturer: JMicron
> [  203.518966] usb 4-1.3: SerialNumber: 00000000000000000000
> [  203.594383] usbcore: registered new interface driver usb-storage
> [  203.612425] scsi host4: uas
> [  203.615418] usbcore: registered new interface driver uas
> [  203.620979] scsi 4:0:0:0: Direct-Access     ST4000NM 0033-9ZM170 
>   0001 PQ: 0 ANSI: 6
> [  203.630240] sd 4:0:0:0: Attached scsi generic sg1 type 0
> [  203.630382] sd 4:0:0:0: [sdb] 7814037168 512-byte logical blocks: 
> (4.00 TB/3.63 TiB)
> [  203.631338] sd 4:0:0:0: [sdb] Write Protect is off
> [  203.631342] sd 4:0:0:0: [sdb] Mode Sense: 67 00 10 08
> [  203.631734] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: 
> enabled, supports DPO and FUA
> [  203.631899] xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled 
> endpoint or incorrect stream ring
> [  203.631904] xhci_hcd 0000:00:11.0: @0000001f610a1c10 00000000 
> 00000000 1b000000 03078001 state 14 ep_info 9403
> [  203.631906] xhci_hcd 0000:00:11.0: No epring
> [  203.674546]  sdb: sdb1
> [  203.676639] sd 4:0:0:0: [sdb] Attached SCSI disk
> [  213.222913] scsi host4: uas_post_reset: alloc streams error -19 after 
> reset
> [  213.230548] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> 
> Above is the dmesg without the unusual_uas patch applied.
> Do you need me to enable any specific dev_dbg and then the dmesg output?

Damn, that is a strange error. Do you know whether it happens on other
XHCI controllers? Which controller are you using and can you please also
post "lsusb -v"?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 12:07   ` George Cherian
  2016-12-21 12:12     ` Oliver Neukum
@ 2016-12-21 12:20     ` Hans de Goede
  2016-12-21 12:47       ` George Cherian
  1 sibling, 1 reply; 22+ messages in thread
From: Hans de Goede @ 2016-12-21 12:20 UTC (permalink / raw)
  To: George Cherian, Oliver Neukum; +Cc: stern, linux-scsi, linux-usb

Hi,

On 21-12-16 13:07, George Cherian wrote:
>
>
> On 12/21/2016 05:12 PM, Oliver Neukum wrote:
>> On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
>>> Hi Oliver,
>>>
>>> I was working with this JMicron device and using the uas driver.
>>> I am seeing the following 2 issues.
>>>
>>> 1) On connect I see the following messages.
>>
>> Thanks. Do you want to submit it to Greg?
>> The patch is fine.
> Yes please!!!
>
>>
>>> 2) On disconnect I am seeing the following issue
>>>
>>>    scsi host4: uas_post_reset: alloc streams error -19 after reset
>>>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>>
>>> This is more fatal because after these messages the USB port becomes
>>> unusable. Even an lsusb invocation hangs for ever.
>>
>> Ouch. That points to a logic error. We should not reset if
>> a device is gone.
>> Could you send dmesg of such a case?
> here is the dmesg!!
> [  203.475382] usb 4-1.3: new SuperSpeed USB device number 3 using xhci_hcd
> [  203.496172] usb 4-1.3: New USB device found, idVendor=152d, idProduct=9561
> [  203.503037] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
> [  203.510352] usb 4-1.3: Product: JMS56x Series
> [  203.514698] usb 4-1.3: Manufacturer: JMicron
> [  203.518966] usb 4-1.3: SerialNumber: 00000000000000000000
> [  203.594383] usbcore: registered new interface driver usb-storage
> [  203.612425] scsi host4: uas
> [  203.615418] usbcore: registered new interface driver uas
> [  203.620979] scsi 4:0:0:0: Direct-Access     ST4000NM 0033-9ZM170  0001 PQ: 0 ANSI: 6
> [  203.630240] sd 4:0:0:0: Attached scsi generic sg1 type 0
> [  203.630382] sd 4:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
> [  203.631338] sd 4:0:0:0: [sdb] Write Protect is off
> [  203.631342] sd 4:0:0:0: [sdb] Mode Sense: 67 00 10 08
> [  203.631734] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
> [  203.631899] xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or incorrect stream ring
> [  203.631904] xhci_hcd 0000:00:11.0: @0000001f610a1c10 00000000 00000000 1b000000 03078001 state 14 ep_info 9403
> [  203.631906] xhci_hcd 0000:00:11.0: No epring
> [  203.674546]  sdb: sdb1
> [  203.676639] sd 4:0:0:0: [sdb] Attached SCSI disk
> [  213.222913] scsi host4: uas_post_reset: alloc streams error -19 after reset
> [  213.230548] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>
> Above is the dmesg without the unusual_uas patch applied.
> Do you need me to enable any specific dev_dbg and then the dmesg output?

Can you get us a dmesg with the unusual_uas patch applied? Usually once things go foobar because
of issue-ing a command which the device does not understand, more things typically come down
as both the device and the host may be in an undefined state then.

Regards,

Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-21 12:20     ` Hans de Goede
@ 2016-12-21 12:47       ` George Cherian
       [not found]         ` <585A79F5.7080701-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: George Cherian @ 2016-12-21 12:47 UTC (permalink / raw)
  To: Hans de Goede, Oliver Neukum
  Cc: stern, linux-scsi, linux-usb, Cherian, George



On 12/21/2016 05:50 PM, Hans de Goede wrote:
> Hi,
>
> On 21-12-16 13:07, George Cherian wrote:
>>
>>
>> On 12/21/2016 05:12 PM, Oliver Neukum wrote:
>>> On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote:
>>>> Hi Oliver,
>>>>
>>>> I was working with this JMicron device and using the uas driver.
>>>> I am seeing the following 2 issues.
>>>>
>>>> 1) On connect I see the following messages.
>>>
>>> Thanks. Do you want to submit it to Greg?
>>> The patch is fine.
>> Yes please!!!
>>
>>>
>>>> 2) On disconnect I am seeing the following issue
>>>>
>>>>    scsi host4: uas_post_reset: alloc streams error -19 after reset
>>>>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>>>
>>>> This is more fatal because after these messages the USB port becomes
>>>> unusable. Even an lsusb invocation hangs for ever.
>>>
>>> Ouch. That points to a logic error. We should not reset if
>>> a device is gone.
>>> Could you send dmesg of such a case?
>> here is the dmesg!!
>> [  203.475382] usb 4-1.3: new SuperSpeed USB device number 3 using
>> xhci_hcd
>> [  203.496172] usb 4-1.3: New USB device found, idVendor=152d,
>> idProduct=9561
>> [  203.503037] usb 4-1.3: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=5
>> [  203.510352] usb 4-1.3: Product: JMS56x Series
>> [  203.514698] usb 4-1.3: Manufacturer: JMicron
>> [  203.518966] usb 4-1.3: SerialNumber: 00000000000000000000
>> [  203.594383] usbcore: registered new interface driver usb-storage
>> [  203.612425] scsi host4: uas
>> [  203.615418] usbcore: registered new interface driver uas
>> [  203.620979] scsi 4:0:0:0: Direct-Access     ST4000NM 0033-9ZM170
>> 0001 PQ: 0 ANSI: 6
>> [  203.630240] sd 4:0:0:0: Attached scsi generic sg1 type 0
>> [  203.630382] sd 4:0:0:0: [sdb] 7814037168 512-byte logical blocks:
>> (4.00 TB/3.63 TiB)
>> [  203.631338] sd 4:0:0:0: [sdb] Write Protect is off
>> [  203.631342] sd 4:0:0:0: [sdb] Mode Sense: 67 00 10 08
>> [  203.631734] sd 4:0:0:0: [sdb] Write cache: enabled, read cache:
>> enabled, supports DPO and FUA
>> [  203.631899] xhci_hcd 0000:00:11.0: ERROR Transfer event for
>> disabled endpoint or incorrect stream ring
>> [  203.631904] xhci_hcd 0000:00:11.0: @0000001f610a1c10 00000000
>> 00000000 1b000000 03078001 state 14 ep_info 9403
>> [  203.631906] xhci_hcd 0000:00:11.0: No epring
>> [  203.674546]  sdb: sdb1
>> [  203.676639] sd 4:0:0:0: [sdb] Attached SCSI disk
>> [  213.222913] scsi host4: uas_post_reset: alloc streams error -19
>> after reset
>> [  213.230548] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>
>> Above is the dmesg without the unusual_uas patch applied.
>> Do you need me to enable any specific dev_dbg and then the dmesg output?
>
> Can you get us a dmesg with the unusual_uas patch applied? Usually once
> things go foobar because
> of issue-ing a command which the device does not understand, more things
> typically come down
> as both the device and the host may be in an undefined state then.

Here is the lsusb -t
============================================================================
lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
         |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
     |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M

lsusb
Bus 003 Device 002: ID 0bda:5401 Realtek Semiconductor Corp. RTL 8153 
USB 3.0 hub with gigabit ethernet
Bus 004 Device 002: ID 0bda:0401 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 004: ID 152d:9561 JMicron Technology Corp. / JMicron USA 
Technology Corp.
lsusb -v
Bus 004 Device 004: ID 152d:9561 JMicron Technology Corp. / JMicron USA 
Technology Corp.
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               3.00
   bDeviceClass            0 (Defined at Interface level)
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0         9
   idVendor           0x152d JMicron Technology Corp. / JMicron USA 
Technology Corp.
   idProduct          0x9561
   bcdDevice            0.01
   iManufacturer           1 JMicron
   iProduct                2 JMS56x Series
   iSerial                 5 00000000000000000000
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength          121
     bNumInterfaces          1
     bConfigurationValue     1
     iConfiguration          4 USB Mass Storage
     bmAttributes         0xc0
       Self Powered
     MaxPower                2mA
     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 MSC Bulk-Only Transfer
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x81  EP 1 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst              15
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x02  EP 2 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst              15
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       1
       bNumEndpoints           4
       bInterfaceClass         8 Mass Storage
       bInterfaceSubClass      6 SCSI
       bInterfaceProtocol     98
       iInterface             10 MSC BOT/UAS Transfer
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x01  EP 1 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst               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     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst               0
         MaxStreams             32
         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     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst              15
         MaxStreams             32
         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     0x0400  1x 1024 bytes
         bInterval               0
         bMaxBurst              15
         MaxStreams             32
         Data-out pipe (0x04)
Binary Object Store Descriptor:
   bLength                 5
   bDescriptorType        15
   wTotalLength           22
   bNumDeviceCaps          2
   USB 2.0 Extension Device Capability:
     bLength                 7
     bDescriptorType        16
     bDevCapabilityType      2
     bmAttributes   0x00000002
       Link Power Management (LPM) Supported
   SuperSpeed USB Device Capability:
     bLength                10
     bDescriptorType        16
     bDevCapabilityType      3
     bmAttributes         0x00
     wSpeedsSupported   0x000e
       Device can operate at Full Speed (12Mbps)
       Device can operate at High Speed (480Mbps)
       Device can operate at SuperSpeed (5Gbps)
     bFunctionalitySupport   1
       Lowest fully-functional device speed is Full Speed (12Mbps)
     bU1DevExitLat          10 micro seconds
     bU2DevExitLat          32 micro seconds
Device Status:     0x0001
   Self Powered
=======================================================================
Connect and disconnect dmesg without uas and usb_storage

[   56.205374] usb 4-1.3: new SuperSpeed USB device number 3 using xhci_hcd
[   56.226152] usb 4-1.3: New USB device found, idVendor=152d, 
idProduct=9561
[   56.233017] usb 4-1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=5
[   56.240332] usb 4-1.3: Product: JMS56x Series
[   56.244677] usb 4-1.3: Manufacturer: JMicron
[   56.248945] usb 4-1.3: SerialNumber: 00000000000000000000
[  337.530073] usb 4-1.3: USB disconnect, device number 3

=======================================================================
Here is the dmesg output with the unusual_uas patch applied
[  832.995364] usb 4-1.3: new SuperSpeed USB device number 5 using xhci_hcd
[  833.016186] usb 4-1.3: New USB device found, idVendor=152d, 
idProduct=9561
[  833.023051] usb 4-1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=5
[  833.030365] usb 4-1.3: Product: JMS56x Series
[  833.034710] usb 4-1.3: Manufacturer: JMicron
[  833.038977] usb 4-1.3: SerialNumber: 00000000000000000000
[  833.045767] scsi host5: uas
[  833.049191] scsi 5:0:0:0: Direct-Access     ST4000NM 0033-9ZM170 
  0001 PQ: 0 ANSI: 6
[  833.058454] sd 5:0:0:0: Attached scsi generic sg1 type 0
[  833.063792] sd 5:0:0:0: [sdb] 7814037168 512-byte logical blocks: 
(4.00 TB/3.63 TiB)
[  833.072483] sd 5:0:0:0: [sdb] Write Protect is off
[  833.077277] sd 5:0:0:0: [sdb] Mode Sense: 67 00 10 08
[  833.077678] sd 5:0:0:0: [sdb] Write cache: enabled, read cache: 
enabled, supports DPO and FUA
[  833.144571]  sdb: sdb1
[  833.149095] sd 5:0:0:0: [sdb] Attached SCSI disk
[  843.149653] scsi host5: uas_post_reset: alloc streams error -19 after 
reset
[  843.157268] sd 5:0:0:0: [sdb] Synchronizing SCSI cache

========================================================================

>
> Regards,
>
> Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]         ` <585A79F5.7080701-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
@ 2016-12-21 14:39           ` Oliver Neukum
       [not found]             ` <1482331185.7638.14.camel-IBi9RG/b67k@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Oliver Neukum @ 2016-12-21 14:39 UTC (permalink / raw)
  To: George Cherian
  Cc: George.Cherian-YGCgFSpz5w/QT0dZR+AlfA, Hans de Goede,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

On Wed, 2016-12-21 at 18:17 +0530, George Cherian wrote:
> [  843.149653] scsi host5: uas_post_reset: alloc streams error -19
> after 
> reset

That would mean the endpoints are gone. Which is odd.

> [  843.157268] sd 5:0:0:0: [sdb] Synchronizing SCSI cache

Could you try the attached patch and do a SCSI log of the enumeration?

	Regards
		Oliver


[-- Attachment #2: 0001-uas-device-crashes-on-reset.patch --]
[-- Type: text/x-patch, Size: 863 bytes --]

From d4ddac88bbf9cb15e7d8638582f96d31e245f15b Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Wed, 21 Dec 2016 15:34:54 +0100
Subject: [PATCH] uas: device crashes on reset

We avoid resetting it.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/usb/core/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index d2e50a2..52483fb 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -194,6 +194,8 @@ static const struct usb_device_id usb_quirk_list[] = {
 	{ USB_DEVICE(0x1532, 0x0116), .driver_info =
 			USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
 
+	{ USB_DEVICE(0x152d, 0x9561), .driver_info = USB_QUIRK_RESET },
+
 	/* BUILDWIN Photo Frame */
 	{ USB_DEVICE(0x1908, 0x1315), .driver_info =
 			USB_QUIRK_HONOR_BNUMINTERFACES },
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]             ` <1482331185.7638.14.camel-IBi9RG/b67k@public.gmane.org>
@ 2016-12-22  2:04               ` George Cherian
       [not found]                 ` <98b66992-826f-7073-2a1d-eee6a2a9590f-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: George Cherian @ 2016-12-22  2:04 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: George.Cherian-YGCgFSpz5w/QT0dZR+AlfA, Hans de Goede,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

Hi Oliver,

I will try it out and update you!!


Regards,

-George

On Wednesday 21 December 2016 08:09 PM, Oliver Neukum wrote:
> On Wed, 2016-12-21 at 18:17 +0530, George Cherian wrote:
>> [  843.149653] scsi host5: uas_post_reset: alloc streams error -19
>> after
>> reset
> That would mean the endpoints are gone. Which is odd.
>
>> [  843.157268] sd 5:0:0:0: [sdb] Synchronizing SCSI cache
> Could you try the attached patch and do a SCSI log of the enumeration?
>
> 	Regards
> 		Oliver
>

--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]                 ` <98b66992-826f-7073-2a1d-eee6a2a9590f-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
@ 2016-12-22 10:13                   ` George Cherian
  2016-12-22 11:25                     ` Oliver Neukum
  0 siblings, 1 reply; 22+ messages in thread
From: George Cherian @ 2016-12-22 10:13 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: George.Cherian-YGCgFSpz5w/QT0dZR+AlfA, Hans de Goede,
	stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

dmesg with the patch applied

[root@localhost ~]# dmesg
[  108.575683] usb 4-1.3: new SuperSpeed USB device number 3 using xhci_hcd
[  108.596485] usb 4-1.3: New USB device found, idVendor=152d, 
idProduct=9561
[  108.603350] usb 4-1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=5
[  108.610663] usb 4-1.3: Product: JMS56x Series
[  108.615009] usb 4-1.3: Manufacturer: JMicron
[  108.619277] usb 4-1.3: SerialNumber: 00000000000000000000
[  109.790747] usbcore: registered new interface driver usb-storage
[  110.061769] scsi host4: scsi_eh_4: sleeping
[  110.062119] scsi host4: uas
[  110.062305] usbcore: registered new interface driver uas
[  110.062370] scsi 4:0:0:0: Send: scmd 0xffff801fddcc1500
[  110.062374] scsi 4:0:0:0: CDB: Inquiry 12 00 00 00 24 00
[  110.062551] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.062555] scsi 4:0:0:0: CDB: Inquiry 12 00 00 00 24 00
[  110.062559] scsi 4:0:0:0: 0 sectors total, 36 bytes done.
[  110.062615] scsi 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.062618] scsi 4:0:0:0: CDB: Inquiry 12 00 00 00 60 00
[  110.062790] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.062793] scsi 4:0:0:0: CDB: Inquiry 12 00 00 00 60 00
[  110.062797] scsi 4:0:0:0: 0 sectors total, 96 bytes done.
[  110.062829] scsi 4:0:0:0: Direct-Access     ST4000NM 0033-9ZM170      
0001 PQ: 0 ANSI: 6
[  110.062844] scsi 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.062847] scsi 4:0:0:0: CDB: Inquiry 12 01 00 00 ff 00
[  110.063011] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.063014] scsi 4:0:0:0: CDB: Inquiry 12 01 00 00 ff 00
[  110.063018] scsi 4:0:0:0: 0 sectors total, 255 bytes done.
[  110.063045] scsi 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.063048] scsi 4:0:0:0: CDB: Inquiry 12 01 80 00 ff 00
[  110.063216] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.063219] scsi 4:0:0:0: CDB: Inquiry 12 01 80 00 ff 00
[  110.063222] scsi 4:0:0:0: 0 sectors total, 255 bytes done.
[  110.063248] scsi 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.063251] scsi 4:0:0:0: CDB: Inquiry 12 01 83 00 ff 00
[  110.063428] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.063431] scsi 4:0:0:0: CDB: Inquiry 12 01 83 00 ff 00
[  110.063435] scsi 4:0:0:0: 0 sectors total, 255 bytes done.
[  110.063463] scsi 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.063466] scsi 4:0:0:0: CDB: Report luns a0 00 00 00 00 00 00 00 10 
00 00 00
[  110.063626] scsi 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.063629] scsi 4:0:0:0: CDB: Report luns a0 00 00 00 00 00 00 00 10 
00 00 00
[  110.063633] scsi 4:0:0:0: 8 sectors total, 4096 bytes done.
[  110.063912] sd 4:0:0:0: Send: scmd 0xffff801fdd8e5880
[  110.063916] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.064018] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.064021] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.064026] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.064050] sd 4:0:0:0: Send: scmd 0xffff801fdd8e5a00
[  110.064053] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.064064] sd 4:0:0:0: Attached scsi generic sg1 type 0
[  110.064209] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.064213] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.064216] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.064240] sd 4:0:0:0: [sdb] 7814037168 512-byte logical blocks: 
(4.00 TB/3.63 TiB)
[  110.064253] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.064256] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.064421] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.064424] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.064427] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.064454] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.064457] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.064625] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.064628] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.064632] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.064658] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.064661] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.064829] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.064832] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.064836] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.064861] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.064864] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.065030] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.065033] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.065037] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.065064] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.065067] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.065251] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.065254] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.065257] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.065275] sd 4:0:0:0: [sdb] Write Protect is off
[  110.065279] sd 4:0:0:0: [sdb] Mode Sense: 67 00 10 08
[  110.065291] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.065294] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.065484] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.065487] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.065490] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.065517] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.065520] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.065698] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.065701] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.065705] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.065724] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: 
enabled, supports DPO and FUA
[  110.065736] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.065739] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.065902] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.065905] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.065909] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.066134] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.066138] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.066226] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.066229] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.066233] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.066257] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.066261] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.066413] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.066416] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.066420] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.066448] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.066452] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.066614] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.066617] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.066620] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.066646] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.066649] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.066833] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.066836] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.066839] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.066865] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.066868] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.067032] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.067035] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.067039] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.067065] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.067068] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.067234] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.067237] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.067241] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.067267] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.067270] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.067456] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.067459] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.067462] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.067488] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.067491] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.067669] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.067672] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.067676] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.067702] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.067705] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.067883] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.067886] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.067889] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.067915] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.067918] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.068081] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.068084] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.068088] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.068138] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=0, count=16
[  110.068141] sd 4:0:0:0: [sdb] block=0
[  110.068144] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.068148] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338880
[  110.068152] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 10 00 00
[  110.068170] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=16, 
count=16
[  110.068173] sd 4:0:0:0: [sdb] block=16
[  110.068176] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.077468] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.077471] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 10 00 00
[  110.077476] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.077479] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.077496] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.077500] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 10 00 00 00 10 00 00
[  110.077516] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=32, 
count=16
[  110.077519] sd 4:0:0:0: [sdb] block=32
[  110.077522] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.077789] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.077793] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 10 00 00 00 10 00 00
[  110.077797] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.077800] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.077811] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338880
[  110.077814] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 20 00 00 00 10 00 00
[  110.077830] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=48, 
count=16
[  110.077833] sd 4:0:0:0: [sdb] block=48
[  110.077836] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.078131] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.078135] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 20 00 00 00 10 00 00
[  110.078139] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.078142] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.078151] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.078154] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 30 00 00 00 10 00 00
[  110.078169] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=64, 
count=16
[  110.078171] sd 4:0:0:0: [sdb] block=64
[  110.078174] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.078459] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.078462] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 30 00 00 00 10 00 00
[  110.078466] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.078469] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.078478] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338880
[  110.078481] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 40 00 00 00 10 00 00
[  110.078495] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=80, 
count=16
[  110.078498] sd 4:0:0:0: [sdb] block=80
[  110.078501] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.078625] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.078629] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 40 00 00 00 10 00 00
[  110.078632] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.078635] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.078644] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.078648] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 50 00 00 00 10 00 00
[  110.078661] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=96, 
count=16
[  110.078664] sd 4:0:0:0: [sdb] block=96
[  110.078667] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.078778] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.078782] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 50 00 00 00 10 00 00
[  110.078785] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.078788] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.078797] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338880
[  110.078800] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 60 00 00 00 10 00 00
[  110.078814] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=112, 
count=16
[  110.078817] sd 4:0:0:0: [sdb] block=112
[  110.078820] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.078928] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.078931] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 60 00 00 00 10 00 00
[  110.078935] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.078938] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.078947] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.078950] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 70 00 00 00 10 00 00
[  110.079078] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.079082] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 70 00 00 00 10 00 00
[  110.079085] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.079088] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.079180] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814037120, count=16
[  110.079183] sd 4:0:0:0: [sdb] block=7814037120
[  110.079186] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.079190] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.079194] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 80 00 00 00 10 00 00
[  110.079212] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814037136, count=16
[  110.079214] sd 4:0:0:0: [sdb] block=7814037136
[  110.079217] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.097427] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.097431] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 80 00 00 00 10 00 00
[  110.097435] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.097438] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.097449] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338880
[  110.097452] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 90 00 00 00 10 00 00
[  110.097468] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814037152, count=16
[  110.097471] sd 4:0:0:0: [sdb] block=7814037152
[  110.097474] sd 4:0:0:0: [sdb] reading 16/16 512 byte blocks.
[  110.097750] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.097753] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 90 00 00 00 10 00 00
[  110.097757] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.097760] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.097770] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.097773] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be a0 00 00 00 10 00 00
[  110.105939] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.105942] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be a0 00 00 00 10 00 00
[  110.105946] sd 4:0:0:0: [sdb] sd_done: completed 8192 of 8192 bytes
[  110.105949] sd 4:0:0:0: [sdb] 16 sectors total, 8192 bytes done.
[  110.106025]  sdb: sdb1
[  110.106322] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.106325] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.106419] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.106423] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.106426] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.106435] sd 4:0:0:0: Send: scmd 0xffff801fcc338880
[  110.106438] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.106527] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.106530] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.106534] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.106542] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.106545] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.106694] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.106698] sd 4:0:0:0: CDB: Read capacity(16) 9e 10 00 00 00 00 00 
00 00 00 00 00 00 20 00 00
[  110.106701] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.106728] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.106732] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.106892] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.106896] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.106899] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.106923] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.106926] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.107107] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.107110] sd 4:0:0:0: CDB: Inquiry 12 01 b0 00 40 00
[  110.107113] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.107138] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.107141] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.107305] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.107308] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.107311] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.107335] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.107338] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.107503] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.107506] sd 4:0:0:0: CDB: Inquiry 12 01 b1 00 40 00
[  110.107509] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.107534] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.107537] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.107732] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.107735] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 3f 00 04 00
[  110.107738] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.107763] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.107766] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.107943] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.107946] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 04 00
[  110.107949] sd 4:0:0:0: 0 sectors total, 4 bytes done.
[  110.107974] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.107976] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.108154] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.108156] sd 4:0:0:0: CDB: Mode Sense(6) 1a 00 08 00 20 00
[  110.108160] sd 4:0:0:0: 0 sectors total, 32 bytes done.
[  110.108184] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.108187] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.108357] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.108360] sd 4:0:0:0: CDB: Inquiry 12 01 00 00 40 00
[  110.108363] sd 4:0:0:0: 0 sectors total, 64 bytes done.
[  110.108380] sd 4:0:0:0: [sdb] Attached SCSI disk
[  110.120479] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x2285
[  110.120486] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x2285
[  110.120504] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fddcc1680
[  110.120508] sd 4:0:0:0: [sdb] CDB: Inquiry 12 00 00 00 24 00
[  110.120685] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.120688] sd 4:0:0:0: [sdb] CDB: Inquiry 12 00 00 00 24 00
[  110.120692] sd 4:0:0:0: [sdb] 0 sectors total, 36 bytes done.
[  110.120719] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x2285
[  110.120724] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x2285
[  110.120739] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.120742] sd 4:0:0:0: [sdb] CDB: ATA command pass through(12)/Blank 
a1 08 2e 00 01 00 00 00 00 ec 00 00
[  110.120760] sd 4:0:0:0: [sdb] Done: SUCCESS Result: 
hostbyte=DID_TARGET_FAILURE driverbyte=DRIVER_OK
[  110.120763] sd 4:0:0:0: [sdb] CDB: ATA command pass through(12)/Blank 
a1 08 2e 00 01 00 00 00 00 ec 00 00
[  110.120768] sd 4:0:0:0: [sdb] Sense Key : Illegal Request [current]
[  110.120774] sd 4:0:0:0: [sdb] Add. Sense: Invalid field in cdb
[  110.120778] sd 4:0:0:0: [sdb] 1 sectors total, 512 bytes done.
[  110.120806] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x30d
[  110.120832] sd 4:0:0:0: Send: scmd 0xffff801fcf9e6180
[  110.120835] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.120947] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.120951] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.120954] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.122574] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x5331
[  110.122615] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036992, count=128
[  110.122618] sd 4:0:0:0: [sdb] block=7814036992
[  110.122622] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.122626] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fd91a0480
[  110.122630] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 00 00 00 00 80 00 00
[  110.123813] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.123817] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 00 00 00 00 80 00 00
[  110.123821] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.123824] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.123876] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814037120, count=48
[  110.123879] sd 4:0:0:0: [sdb] block=7814037120
[  110.123882] sd 4:0:0:0: [sdb] reading 48/48 512 byte blocks.
[  110.123886] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.123890] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 80 00 00 00 30 00 00
[  110.124162] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.124165] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
be 80 00 00 00 30 00 00
[  110.124169] sd 4:0:0:0: [sdb] sd_done: completed 24576 of 24576 bytes
[  110.124173] sd 4:0:0:0: [sdb] 48 sectors total, 24576 bytes done.
[  110.124216] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=0, 
count=128
[  110.124219] sd 4:0:0:0: [sdb] block=0
[  110.124222] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.124226] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.124230] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 80 00 00
[  110.124560] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.124563] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 80 00 00
[  110.124567] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.124570] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.124622] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036864, count=128
[  110.124624] sd 4:0:0:0: [sdb] block=7814036864
[  110.124628] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.124632] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.124636] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bd 80 00 00 00 80 00 00
[  110.124987] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.124990] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bd 80 00 00 00 80 00 00
[  110.124994] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.124998] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.125060] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036736, count=128
[  110.125063] sd 4:0:0:0: [sdb] block=7814036736
[  110.125066] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.125071] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.125074] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bd 00 00 00 00 80 00 00
[  110.129185] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.129189] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bd 00 00 00 00 80 00 00
[  110.129193] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.129197] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.129242] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036480, count=128
[  110.129245] sd 4:0:0:0: [sdb] block=7814036480
[  110.129248] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.129252] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.129256] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bc 00 00 00 00 80 00 00
[  110.130064] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.130068] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bc 00 00 00 00 80 00 00
[  110.130072] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.130075] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.130120] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036352, count=128
[  110.130123] sd 4:0:0:0: [sdb] block=7814036352
[  110.130127] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.130131] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.130135] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bb 80 00 00 00 80 00 00
[  110.135047] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.135050] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bb 80 00 00 00 80 00 00
[  110.135054] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.135057] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.135100] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036224, count=128
[  110.135103] sd 4:0:0:0: [sdb] block=7814036224
[  110.135106] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.135110] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.135114] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bb 00 00 00 00 80 00 00
[  110.136011] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.136015] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
bb 00 00 00 00 80 00 00
[  110.136019] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.136022] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.136067] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814036096, count=128
[  110.136069] sd 4:0:0:0: [sdb] block=7814036096
[  110.136073] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.136077] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.136081] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
ba 80 00 00 00 80 00 00
[  110.136473] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.136476] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
ba 80 00 00 00 80 00 00
[  110.136480] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.136483] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.136531] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814034048, count=128
[  110.136534] sd 4:0:0:0: [sdb] block=7814034048
[  110.136537] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.136541] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.136545] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b2 80 00 00 00 80 00 00
[  110.138254] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.138258] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b2 80 00 00 00 80 00 00
[  110.138262] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.138265] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.138332] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=2048, 
count=128
[  110.138335] sd 4:0:0:0: [sdb] block=2048
[  110.138338] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.138342] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.138346] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
08 00 00 00 00 80 00 00
[  110.158084] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.158088] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
08 00 00 00 00 80 00 00
[  110.158092] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.158095] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.158222] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=128, 
count=384
[  110.158224] sd 4:0:0:0: [sdb] block=128
[  110.158228] sd 4:0:0:0: [sdb] reading 384/384 512 byte blocks.
[  110.158232] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.158236] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 80 00 00 01 80 00 00
[  110.158956] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.158959] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 80 00 00 01 80 00 00
[  110.158964] sd 4:0:0:0: [sdb] sd_done: completed 196608 of 196608 bytes
[  110.158967] sd 4:0:0:0: [sdb] 384 sectors total, 196608 bytes done.
[  110.159136] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=768, 
count=128
[  110.159139] sd 4:0:0:0: [sdb] block=768
[  110.159142] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.159146] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.159150] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
03 00 00 00 00 80 00 00
[  110.159626] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.159630] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
03 00 00 00 00 80 00 00
[  110.159634] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.159637] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.159712] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=896, 
count=128
[  110.159715] sd 4:0:0:0: [sdb] block=896
[  110.159719] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.159723] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.159727] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
03 80 00 00 00 80 00 00
[  110.160087] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.160090] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
03 80 00 00 00 80 00 00
[  110.160094] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.160097] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.160176] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=512, 
count=128
[  110.160179] sd 4:0:0:0: [sdb] block=512
[  110.160182] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.160187] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.160190] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
02 00 00 00 00 80 00 00
[  110.160622] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.160626] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
02 00 00 00 00 80 00 00
[  110.160630] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.160633] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.160688] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=4096, 
count=128
[  110.160691] sd 4:0:0:0: [sdb] block=4096
[  110.160694] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.160699] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.160702] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
10 00 00 00 00 80 00 00
[  110.163701] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.163704] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
10 00 00 00 00 80 00 00
[  110.163708] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.163711] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.164996] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.165000] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.165091] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.165095] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.165098] sd 4:0:0:0: 0 sectors total, 0 bytes done.
[  110.166532] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814035328, count=128
[  110.166535] sd 4:0:0:0: [sdb] block=7814035328
[  110.166539] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.166543] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fdccdf000
[  110.166547] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b7 80 00 00 00 80 00 00
[  110.187509] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.187512] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b7 80 00 00 00 80 00 00
[  110.187517] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.187520] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.187575] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78139392, count=128
[  110.187578] sd 4:0:0:0: [sdb] block=78139392
[  110.187581] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.187586] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.187590] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
50 00 00 00 00 80 00 00
[  110.205051] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.205055] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
50 00 00 00 00 80 00 00
[  110.205059] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.205062] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.205115] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=7814035072, count=128
[  110.205118] sd 4:0:0:0: [sdb] block=7814035072
[  110.205121] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.205126] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.205129] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b6 80 00 00 00 80 00 00
[  110.227429] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.227432] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 01 d1 c0 
b6 80 00 00 00 80 00 00
[  110.227436] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.227440] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.227511] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78141440, count=128
[  110.227514] sd 4:0:0:0: [sdb] block=78141440
[  110.227517] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.227521] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.227525] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
58 00 00 00 00 80 00 00
[  110.243636] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.243640] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
58 00 00 00 00 80 00 00
[  110.243644] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.243647] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.243762] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78139520, count=384
[  110.243764] sd 4:0:0:0: [sdb] block=78139520
[  110.243768] sd 4:0:0:0: [sdb] reading 384/384 512 byte blocks.
[  110.243772] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.243776] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
50 80 00 00 01 80 00 00
[  110.247695] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.247699] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
50 80 00 00 01 80 00 00
[  110.247703] sd 4:0:0:0: [sdb] sd_done: completed 196608 of 196608 bytes
[  110.247706] sd 4:0:0:0: [sdb] 384 sectors total, 196608 bytes done.
[  110.247985] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78140160, count=128
[  110.247988] sd 4:0:0:0: [sdb] block=78140160
[  110.247992] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.247996] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.248000] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
53 00 00 00 00 80 00 00
[  110.248680] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.248684] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
53 00 00 00 00 80 00 00
[  110.248688] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.248691] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.248769] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78140288, count=128
[  110.248772] sd 4:0:0:0: [sdb] block=78140288
[  110.248775] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.248779] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.248783] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
53 80 00 00 00 80 00 00
[  110.249191] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.249194] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
53 80 00 00 00 80 00 00
[  110.249198] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.249202] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.249285] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78139904, count=128
[  110.249288] sd 4:0:0:0: [sdb] block=78139904
[  110.249291] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.249296] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.249299] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
52 00 00 00 00 80 00 00
[  110.249708] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.249712] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
52 00 00 00 00 80 00 00
[  110.249716] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.249719] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.249771] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: 
block=78143488, count=128
[  110.249774] sd 4:0:0:0: [sdb] block=78143488
[  110.249778] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.249782] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.249786] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
60 00 00 00 00 80 00 00
[  110.257495] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.257499] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 04 a8 
60 00 00 00 00 80 00 00
[  110.257503] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.257506] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.257727] sd 4:0:0:0: [sdb] sd_ioctl: disk=sdb, cmd=0x5331
[  110.257759] sd 4:0:0:0: [sdb] sd_setup_read_write_cmnd: block=0, 
count=128
[  110.257762] sd 4:0:0:0: [sdb] block=0
[  110.257765] sd 4:0:0:0: [sdb] reading 128/128 512 byte blocks.
[  110.257770] sd 4:0:0:0: [sdb] Send: scmd 0xffff801fcc338a00
[  110.257773] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 80 00 00
[  110.258168] sd 4:0:0:0: [sdb] Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.258171] sd 4:0:0:0: [sdb] CDB: Read(16) 88 00 00 00 00 00 00 00 
00 00 00 00 00 80 00 00
[  110.258175] sd 4:0:0:0: [sdb] sd_done: completed 65536 of 65536 bytes
[  110.258179] sd 4:0:0:0: [sdb] 128 sectors total, 65536 bytes done.
[  110.259759] sd 4:0:0:0: Send: scmd 0xffff801fcc338a00
[  110.259763] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.259854] sd 4:0:0:0: Done: SUCCESS Result: hostbyte=DID_OK 
driverbyte=DRIVER_OK
[  110.259858] sd 4:0:0:0: CDB: Test Unit Ready 00 00 00 00 00 00
[  110.259861] sd 4:0:0:0: 0 sectors total, 0 bytes done.
=========================Connect end ====================================

===========================Disconnect log =================================

[  358.581289] scsi host4: uas_post_reset: alloc streams error -19 after 
reset
[  358.588962] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
=====================================================================


On Thursday 22 December 2016 07:34 AM, George Cherian wrote:
> Hi Oliver,
>
> I will try it out and update you!!
>
>
> Regards,
>
> -George
>
> On Wednesday 21 December 2016 08:09 PM, Oliver Neukum wrote:
>> On Wed, 2016-12-21 at 18:17 +0530, George Cherian wrote:
>>> [  843.149653] scsi host5: uas_post_reset: alloc streams error -19
>>> after
>>> reset
>> That would mean the endpoints are gone. Which is odd.
>>
>>> [  843.157268] sd 5:0:0:0: [sdb] Synchronizing SCSI cache
>> Could you try the attached patch and do a SCSI log of the enumeration?
>>
>>     Regards
>>         Oliver
>>
>

--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-22 10:13                   ` George Cherian
@ 2016-12-22 11:25                     ` Oliver Neukum
  0 siblings, 0 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-22 11:25 UTC (permalink / raw)
  To: George Cherian
  Cc: George.Cherian, Hans de Goede, stern, linux-scsi, linux-usb

On Thu, 2016-12-22 at 15:43 +0530, George Cherian wrote:
> dmesg with the patch applied

Hi,

did you apply both patches, yours and the one I posted?
And did you physically disconnect your device?

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found] ` <585A69E6.6040009-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
@ 2016-12-22 22:44   ` Alan Stern
  2016-12-23  3:01     ` George Cherian
  2016-12-27 14:34     ` Oliver Neukum
  0 siblings, 2 replies; 22+ messages in thread
From: Alan Stern @ 2016-12-22 22:44 UTC (permalink / raw)
  To: George Cherian
  Cc: oneukum-IBi9RG/b67k, linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	hdegoede-H+wXaHxf7aLQT0dZR+AlfA

On Wed, 21 Dec 2016, George Cherian wrote:

> Hi Oliver,
> 
> I was working with this JMicron device and using the uas driver.
> I am seeing the following 2 issues.
> 
> 1) On connect I see the following messages.
> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or 
> incorrect stream ring
>   This was eliminated using the following scissor patch.
> 
> ---------------------------------8<------------------------------------
> [PATCH] usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
> 
> This device gives the following error on detection.
> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or 
> incorrect stream ring
> 
> The same error is not seen when it is added to unusual_device
> list with US_FL_NO_REPORT_OPCODES passed.
> 
> Signed-off-by: George Cherian <george.cherian-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> ---
>   drivers/usb/storage/unusual_uas.h | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/storage/unusual_uas.h 
> b/drivers/usb/storage/unusual_uas.h
> index cbea9f3..d292299 100644
> --- a/drivers/usb/storage/unusual_uas.h
> +++ b/drivers/usb/storage/unusual_uas.h
> @@ -142,6 +142,13 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
>   		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>   		US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
> 
> +/* Reported-by George Cherian <george.cherian-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org> */
> +UNUSUAL_DEV(0x152d, 0x9561, 0x0000, 0x9999,
> +                "JMicron",
> +                "JMS56x",
> +                USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> +                US_FL_NO_REPORT_OPCODES),
> +
>   /* Reported-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> */
>   UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
>   		"VIA",
> --------------------------------->8------------------------------------

I don't see how this patch fixes anything.  Unless I'm mistaken, it
just avoids the problem by preventing the system from issuing the
command that provokes the error, rather than really fixing the
underlying error.

> 2) On disconnect I am seeing the following issue
> 
>   scsi host4: uas_post_reset: alloc streams error -19 after reset
>   sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> 
> This is more fatal because after these messages the USB port becomes 
> unusable. Even an lsusb invocation hangs for ever.

This problem looks pretty simple.  uas doesn't check properly to see if 
the device was disconnected following a reset.

Try changing the line in uas_post_reset() that says:

	if (devinfo->shutdown)

to:

	if (devinfo->shutdown ||
			devinfo->udev->state == USB_STATE_NOTATTACHED)

Alan Stern

--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-22 22:44   ` Alan Stern
@ 2016-12-23  3:01     ` George Cherian
  2016-12-23 14:22       ` Alan Stern
  2016-12-27 14:34     ` Oliver Neukum
  1 sibling, 1 reply; 22+ messages in thread
From: George Cherian @ 2016-12-23  3:01 UTC (permalink / raw)
  To: Alan Stern; +Cc: oneukum, linux-scsi, linux-usb, hdegoede

Hi Alan,


On Friday 23 December 2016 04:14 AM, Alan Stern wrote:
> On Wed, 21 Dec 2016, George Cherian wrote:
>
>> Hi Oliver,
>>
>> I was working with this JMicron device and using the uas driver.
>> I am seeing the following 2 issues.
>>
>> 1) On connect I see the following messages.
>> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or
>> incorrect stream ring
>>    This was eliminated using the following scissor patch.
>>
>> ---------------------------------8<------------------------------------
>> [PATCH] usb: storage: unusual_uas: Add JMicron JMS56x to unusual device
>>
>> This device gives the following error on detection.
>> xhci_hcd 0000:00:11.0: ERROR Transfer event for disabled endpoint or
>> incorrect stream ring
>>
>> The same error is not seen when it is added to unusual_device
>> list with US_FL_NO_REPORT_OPCODES passed.
>>
>> Signed-off-by: George Cherian <george.cherian@cavium.com>
>> ---
>>    drivers/usb/storage/unusual_uas.h | 7 +++++++
>>    1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/usb/storage/unusual_uas.h
>> b/drivers/usb/storage/unusual_uas.h
>> index cbea9f3..d292299 100644
>> --- a/drivers/usb/storage/unusual_uas.h
>> +++ b/drivers/usb/storage/unusual_uas.h
>> @@ -142,6 +142,13 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999,
>>    		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>>    		US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES),
>>
>> +/* Reported-by George Cherian <george.cherian@cavium.com> */
>> +UNUSUAL_DEV(0x152d, 0x9561, 0x0000, 0x9999,
>> +                "JMicron",
>> +                "JMS56x",
>> +                USB_SC_DEVICE, USB_PR_DEVICE, NULL,
>> +                US_FL_NO_REPORT_OPCODES),
>> +
>>    /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
>>    UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
>>    		"VIA",
>> --------------------------------->8------------------------------------
> I don't see how this patch fixes anything.  Unless I'm mistaken, it
> just avoids the problem by preventing the system from issuing the
> command that provokes the error, rather than really fixing the
> underlying error.
>
>> 2) On disconnect I am seeing the following issue
>>
>>    scsi host4: uas_post_reset: alloc streams error -19 after reset
>>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
>>
>> This is more fatal because after these messages the USB port becomes
>> unusable. Even an lsusb invocation hangs for ever.
> This problem looks pretty simple.  uas doesn't check properly to see if
> the device was disconnected following a reset.
>
> Try changing the line in uas_post_reset() that says:
>
> 	if (devinfo->shutdown)
>
> to:
>
> 	if (devinfo->shutdown ||
> 			devinfo->udev->state == USB_STATE_NOTATTACHED)
Yes this works for me but with a little bit change as follows, But am 
not sure whether we should goto reset_scsi in case of shutdown.
Please advice.

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 5ef014b..24db3fd 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1072,8 +1072,8 @@ static int uas_post_reset(struct usb_interface *intf)
         unsigned long flags;
         int err;

-       if (devinfo->shutdown)
-               return 0;
+       if (devinfo->shutdown || devinfo->udev->state == 
USB_STATE_NOTATTACHED)
+               goto reset_scsi;

         err = uas_configure_endpoints(devinfo);
         if (err) {
@@ -1083,6 +1083,7 @@ static int uas_post_reset(struct usb_interface *intf)
                 return 1;
         }

+reset_scsi:
         spin_lock_irqsave(shost->host_lock, flags);
         scsi_report_bus_reset(shost, 0);
         spin_unlock_irqrestore(shost->host_lock, flags);

> Alan Stern
>


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-23  3:01     ` George Cherian
@ 2016-12-23 14:22       ` Alan Stern
  0 siblings, 0 replies; 22+ messages in thread
From: Alan Stern @ 2016-12-23 14:22 UTC (permalink / raw)
  To: George Cherian; +Cc: oneukum, linux-scsi, linux-usb, hdegoede

On Fri, 23 Dec 2016, George Cherian wrote:

> >> 2) On disconnect I am seeing the following issue
> >>
> >>    scsi host4: uas_post_reset: alloc streams error -19 after reset
> >>    sd 4:0:0:0: [sdb] Synchronizing SCSI cache
> >>
> >> This is more fatal because after these messages the USB port becomes
> >> unusable. Even an lsusb invocation hangs for ever.
> > This problem looks pretty simple.  uas doesn't check properly to see if
> > the device was disconnected following a reset.
> >
> > Try changing the line in uas_post_reset() that says:
> >
> > 	if (devinfo->shutdown)
> >
> > to:
> >
> > 	if (devinfo->shutdown ||
> > 			devinfo->udev->state == USB_STATE_NOTATTACHED)
> Yes this works for me but with a little bit change as follows, But am 
> not sure whether we should goto reset_scsi in case of shutdown.
> Please advice.
> 
> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
> index 5ef014b..24db3fd 100644
> --- a/drivers/usb/storage/uas.c
> +++ b/drivers/usb/storage/uas.c
> @@ -1072,8 +1072,8 @@ static int uas_post_reset(struct usb_interface *intf)
>          unsigned long flags;
>          int err;
> 
> -       if (devinfo->shutdown)
> -               return 0;
> +       if (devinfo->shutdown || devinfo->udev->state == 
> USB_STATE_NOTATTACHED)
> +               goto reset_scsi;
> 
>          err = uas_configure_endpoints(devinfo);
>          if (err) {
> @@ -1083,6 +1083,7 @@ static int uas_post_reset(struct usb_interface *intf)
>                  return 1;
>          }
> 
> +reset_scsi:
>          spin_lock_irqsave(shost->host_lock, flags);
>          scsi_report_bus_reset(shost, 0);
>          spin_unlock_irqrestore(shost->host_lock, flags);

As far as I can tell, adding the "goto reset_scsi" line does not help 
at all.  There's no reason to report that the bus has been reset after 
the device is gone.

Alan Stern


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-22 22:44   ` Alan Stern
  2016-12-23  3:01     ` George Cherian
@ 2016-12-27 14:34     ` Oliver Neukum
       [not found]       ` <1482849255.1731.1.camel-IBi9RG/b67k@public.gmane.org>
  1 sibling, 1 reply; 22+ messages in thread
From: Oliver Neukum @ 2016-12-27 14:34 UTC (permalink / raw)
  To: Alan Stern; +Cc: George Cherian, hdegoede, linux-scsi, linux-usb

On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
> I don't see how this patch fixes anything.  Unless I'm mistaken, it
> just avoids the problem by preventing the system from issuing the
> command that provokes the error, rather than really fixing the
> underlying error.

Please clarify. If a reset leads to a disconnect, isn't that
exactly what we want?

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]       ` <1482849255.1731.1.camel-IBi9RG/b67k@public.gmane.org>
@ 2016-12-27 15:20         ` Alan Stern
       [not found]           ` <Pine.LNX.4.44L0.1612271015100.21478-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
  2016-12-27 18:22           ` George Cherian
  0 siblings, 2 replies; 22+ messages in thread
From: Alan Stern @ 2016-12-27 15:20 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: George Cherian, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Tue, 27 Dec 2016, Oliver Neukum wrote:

> On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
> > I don't see how this patch fixes anything.  Unless I'm mistaken, it
> > just avoids the problem by preventing the system from issuing the
> > command that provokes the error, rather than really fixing the
> > underlying error.
> 
> Please clarify. If a reset leads to a disconnect, isn't that
> exactly what we want?

I didn't express myself clearly enough.  Yes, if a reset leads to a 
disconnect then avoiding the reset will avoid problems.

But the _real_ error here is that xhci-hcd says "ERROR Transfer event
for disabled endpoint or incorrect stream ring" when the disconnect 
occurs during reset.  That shouldn't happen, no matter what quirks the 
device has.  It indicates a bug either in uas or in xhci-hcd.

Alan Stern

--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
       [not found]           ` <Pine.LNX.4.44L0.1612271015100.21478-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2016-12-27 15:53             ` Oliver Neukum
  0 siblings, 0 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-27 15:53 UTC (permalink / raw)
  To: Alan Stern
  Cc: George Cherian, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
	linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Tue, 2016-12-27 at 10:20 -0500, Alan Stern wrote:
> On Tue, 27 Dec 2016, Oliver Neukum wrote:
> 
> > On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
> > > I don't see how this patch fixes anything.  Unless I'm mistaken, it
> > > just avoids the problem by preventing the system from issuing the
> > > command that provokes the error, rather than really fixing the
> > > underlying error.
> > 
> > Please clarify. If a reset leads to a disconnect, isn't that
> > exactly what we want?
> 
> I didn't express myself clearly enough.  Yes, if a reset leads to a 
> disconnect then avoiding the reset will avoid problems.

Good. Then we need to clarify whether the device was physically
disconnected when the logs were taken.

> But the _real_ error here is that xhci-hcd says "ERROR Transfer event
> for disabled endpoint or incorrect stream ring" when the disconnect 
> occurs during reset.  That shouldn't happen, no matter what quirks the 
> device has.  It indicates a bug either in uas or in xhci-hcd.

True. I am afraid that there necessarily is a window for resetting a
disconnected device. But the check you proposed is better.
however, I'd like to encapsulate that together with a test for
logical disconnect. Uas is unlikely to be the only driver that has
this issue.

	Regards
		Oliver




--
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] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-27 15:20         ` Alan Stern
       [not found]           ` <Pine.LNX.4.44L0.1612271015100.21478-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2016-12-27 18:22           ` George Cherian
  2016-12-28  2:19             ` Alan Stern
  1 sibling, 1 reply; 22+ messages in thread
From: George Cherian @ 2016-12-27 18:22 UTC (permalink / raw)
  To: Alan Stern, Oliver Neukum; +Cc: hdegoede, linux-scsi, linux-usb

Hi Alan,


On Tuesday 27 December 2016 08:50 PM, Alan Stern wrote:
> On Tue, 27 Dec 2016, Oliver Neukum wrote:
>
>> On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
>>> I don't see how this patch fixes anything.  Unless I'm mistaken, it
>>> just avoids the problem by preventing the system from issuing the
>>> command that provokes the error, rather than really fixing the
>>> underlying error.
>> Please clarify. If a reset leads to a disconnect, isn't that
>> exactly what we want?
> I didn't express myself clearly enough.  Yes, if a reset leads to a
> disconnect then avoiding the reset will avoid problems.
>
> But the _real_ error here is that xhci-hcd says "ERROR Transfer event
> for disabled endpoint or incorrect stream ring" when the disconnect
> occurs during reset.
I think there is some misunderstanding of the issues.

"ERROR Transfer event for disabled endpoint or incorrect stream ring" This particular message is during the connect of the device and not during the disconnect.
To avoid this message the unusual_uas.h patch was sent earlier.

During disconnect of the device I get   "scsi host4: uas_post_reset: alloc streams error -19 after reset" and 
I dont get the same with the modified patch which Alan suggested, 
instead I get a proper disconnect.

> That shouldn't happen, no matter what quirks the
> device has.  It indicates a bug either in uas or in xhci-hcd.
>
> Alan Stern
>
Regards, -George

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-27 18:22           ` George Cherian
@ 2016-12-28  2:19             ` Alan Stern
  2016-12-29  8:28               ` Oliver Neukum
  0 siblings, 1 reply; 22+ messages in thread
From: Alan Stern @ 2016-12-28  2:19 UTC (permalink / raw)
  To: George Cherian; +Cc: Oliver Neukum, hdegoede, linux-scsi, linux-usb

On Tue, 27 Dec 2016, George Cherian wrote:

> Hi Alan,
> 
> 
> On Tuesday 27 December 2016 08:50 PM, Alan Stern wrote:
> > On Tue, 27 Dec 2016, Oliver Neukum wrote:
> >
> >> On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
> >>> I don't see how this patch fixes anything.  Unless I'm mistaken, it
> >>> just avoids the problem by preventing the system from issuing the
> >>> command that provokes the error, rather than really fixing the
> >>> underlying error.
> >> Please clarify. If a reset leads to a disconnect, isn't that
> >> exactly what we want?
> > I didn't express myself clearly enough.  Yes, if a reset leads to a
> > disconnect then avoiding the reset will avoid problems.
> >
> > But the _real_ error here is that xhci-hcd says "ERROR Transfer event
> > for disabled endpoint or incorrect stream ring" when the disconnect
> > occurs during reset.
> I think there is some misunderstanding of the issues.
> 
> "ERROR Transfer event for disabled endpoint or incorrect stream ring"
> This particular message is during the connect of the device and not
> during the disconnect.
> To avoid this message the unusual_uas.h patch was sent earlier.

Right -- the patch _avoids_ the message.  But it doesn't fix the actual 
error/bug that caused to message to be logged in the first place.

> During disconnect of the device I get   "scsi host4: uas_post_reset: alloc streams error -19 after reset" and 
> I dont get the same with the modified patch which Alan suggested, 
> instead I get a proper disconnect.

Good.


On Tue, 27 Dec 2016, Oliver Neukum wrote:

> On Tue, 2016-12-27 at 10:20 -0500, Alan Stern wrote:
> > On Tue, 27 Dec 2016, Oliver Neukum wrote:
> > 
> > > On Thu, 2016-12-22 at 17:44 -0500, Alan Stern wrote:
> > > > I don't see how this patch fixes anything.  Unless I'm mistaken, it
> > > > just avoids the problem by preventing the system from issuing the
> > > > command that provokes the error, rather than really fixing the
> > > > underlying error.
> > > 
> > > Please clarify. If a reset leads to a disconnect, isn't that
> > > exactly what we want?
> > 
> > I didn't express myself clearly enough.  Yes, if a reset leads to a 
> > disconnect then avoiding the reset will avoid problems.
> 
> Good. Then we need to clarify whether the device was physically
> disconnected when the logs were taken.

According to George, it was connected when the first error message 
occurred and physically disconnected when the second message occurred.

> > But the _real_ error here is that xhci-hcd says "ERROR Transfer event
> > for disabled endpoint or incorrect stream ring" when the disconnect 
> > occurs during reset.  That shouldn't happen, no matter what quirks the 
> > device has.  It indicates a bug either in uas or in xhci-hcd.
> 
> True. I am afraid that there necessarily is a window for resetting a
> disconnected device. But the check you proposed is better.
> however, I'd like to encapsulate that together with a test for
> logical disconnect. Uas is unlikely to be the only driver that has
> this issue.

True enough.  We could have a usb_device_is_disconnected() inline
helper for this purpose.  There's no need to try to distinguish 
between physical and logical disconnects, as far as I can see.

However, as George points out, the "Transfer event" error has nothing 
to do with disconnection.  It was triggered by the device's bogus 
response to a REPORT OPCODES command, or something of the sort.  We 
should be able to handle bogus responses without logging ERROR 
messages, because such messages indicate a bug in a kernel driver.

Alan Stern



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: JMS56x not working reliably with uas driver
  2016-12-28  2:19             ` Alan Stern
@ 2016-12-29  8:28               ` Oliver Neukum
  0 siblings, 0 replies; 22+ messages in thread
From: Oliver Neukum @ 2016-12-29  8:28 UTC (permalink / raw)
  To: Alan Stern; +Cc: George Cherian, hdegoede, linux-scsi, linux-usb

On Tue, 2016-12-27 at 21:19 -0500, Alan Stern wrote:
> On Tue, 27 Dec 2016, George Cherian wrote:

> > True. I am afraid that there necessarily is a window for resetting a
> > disconnected device. But the check you proposed is better.
> > however, I'd like to encapsulate that together with a test for
> > logical disconnect. Uas is unlikely to be the only driver that has
> > this issue.
> 
> True enough.  We could have a usb_device_is_disconnected() inline
> helper for this purpose.  There's no need to try to distinguish 
> between physical and logical disconnects, as far as I can see.

There is no such need. There is a need for both checks though.

> However, as George points out, the "Transfer event" error has nothing 
> to do with disconnection.  It was triggered by the device's bogus 
> response to a REPORT OPCODES command, or something of the sort.  We 
> should be able to handle bogus responses without logging ERROR 
> messages, because such messages indicate a bug in a kernel driver.

Indeed. We have two independent issues. We should have two independent
fixes.

	Regards
		Oliver




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-12-29  8:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 11:39 JMS56x not working reliably with uas driver George Cherian
2016-12-21 11:42 ` Oliver Neukum
     [not found]   ` <1482320547.7638.7.camel-IBi9RG/b67k@public.gmane.org>
2016-12-21 11:54     ` Hans de Goede
2016-12-21 11:54       ` Oliver Neukum
2016-12-21 12:07   ` George Cherian
2016-12-21 12:12     ` Oliver Neukum
2016-12-21 12:20     ` Hans de Goede
2016-12-21 12:47       ` George Cherian
     [not found]         ` <585A79F5.7080701-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-12-21 14:39           ` Oliver Neukum
     [not found]             ` <1482331185.7638.14.camel-IBi9RG/b67k@public.gmane.org>
2016-12-22  2:04               ` George Cherian
     [not found]                 ` <98b66992-826f-7073-2a1d-eee6a2a9590f-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-12-22 10:13                   ` George Cherian
2016-12-22 11:25                     ` Oliver Neukum
2016-12-21 11:50 ` Hans de Goede
     [not found] ` <585A69E6.6040009-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-12-22 22:44   ` Alan Stern
2016-12-23  3:01     ` George Cherian
2016-12-23 14:22       ` Alan Stern
2016-12-27 14:34     ` Oliver Neukum
     [not found]       ` <1482849255.1731.1.camel-IBi9RG/b67k@public.gmane.org>
2016-12-27 15:20         ` Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1612271015100.21478-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-12-27 15:53             ` Oliver Neukum
2016-12-27 18:22           ` George Cherian
2016-12-28  2:19             ` Alan Stern
2016-12-29  8:28               ` Oliver Neukum

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.