Re: Fwd: usb: uas: device reset most the time while enumeration- usb3.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oliver/Greg,

I am able to duplicated the UAS issue on 4.16 as well.
The behavior is same new usb device detects and reset after aprox 30 sec(SD_TIMEOUT)
Logs are already shared below.

We are using Synopsys dwc3 as host controller, May I know have tested it with dwc3? I have tried it on Linux PC (x86 Ubuntu machine) I could not see the issue. It enumerates well.


Right now I have 2 UAS device and on both issue is duplicated.
1) StoreJet TS256GESD400K
2) Samsung  Portable SSD T3

Any input is helpful.

Best Regards,
Tushar R Nimkar
Mob No : +91-9052258800

QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


On 2018-04-04 16:39, Tushar Nimkar wrote:
---------- Forwarded message ----------
forwarding to codeaurora account...

From: Tushar Nimkar <tushar.nims@xxxxxxxxx>
Date: Wed, Feb 7, 2018 at 8:48 PM
Subject: Re: usb: uas: device reset most the time while enumeration- usb3.0
To: Oliver Neukum <oneukum@xxxxxxxx>
Cc: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-usb@xxxxxxxxxxxxxxx

Oliver/Greg,
sorry to say but for my custom board it's difficult to flash 4.14 or
4.15. I are not sure that it will boot or not on my platform.
But Still i will try to do that and in parallel will try to flash on
Beagle bone.And will try.

 I used Lecroy today following are some observation..

working case :
for every try of ready_capacity_16 (total 3), there are bulk
transfer(OUT and IN) and status for read_capacity_16 is  "GOOD"

non-working case:
for first try of ready_capacity_16 there is bulk OUT but no IN
transfer , status for read_capacity_16 is "MISSING"
...seems that's that is the case we are receiving the
blk_rq_timed_out_timer() and eventually uas_eh_device_reset_handler()
I could not find why the bulk transfer could not  complete and causing
timer to expire.


Also  adding some msleep(100) before calling sd_read_capacity(), many
times i could not see the issue.

I don't know how to share Lecroy logs here. I can share the logs.

Best Regards,
Tushar R Nimkar
Mob No : +91-9052258800


On Tue, Feb 6, 2018 at 3:32 PM, Oliver Neukum <oneukum@xxxxxxxx> wrote:
Am Montag, den 05.02.2018, 23:46 +0530 schrieb Tushar Nimkar:
Greg,

I have cherry-picked 9 patches as follows.

Those won't do you any good. Please test

a) with 4.14 or 4.15
b) test on another host

And tell me what read_capacity_16() does at USB2.0 speeds

We need to determine whether error handling just works better
at lower speed or high speed triggers the error. And with
a current kernel if possible at all.

        Regards
                Oliver



From: Tushar Nimkar <tushar.nims@xxxxxxxxx>
Date: Mon, Feb 5, 2018 at 11:46 PM
Subject: Re: usb: uas: device reset most the time while enumeration- usb3.0
To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx


Greg,

I have cherry-picked 9 patches as follows.


d921462 USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID

d7321ce uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069

b3568a9 uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices

66215a3 USB: uas: fix bug in handling of alternate settings

34ce628 scsi: uas: move eh_bus_reset_handler to eh_device_reset_handler

c5afd93 uas: remove can_queue set in host template

75b8da4 USB: uas: add full support for RESPONSE IU

befea02 uas: no gfp argument to uas_submit_urbs()

849b7c6 uas: use the BIT() macro




I will try and update the same if possible to duplicate this on 4.14.14 or 4.15

On Mon, Feb 5, 2018 at 11:40 PM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
On Mon, Feb 05, 2018 at 11:34:40PM +0530, Tushar Nimkar wrote:
Hi ,

I am enabling uas support. And facing the issue as follows.

I have observed that when ( Transcend StoreJet TS256GESD400K )
connected to my custom board,  it detects first then
uas_eh_abort_handler() get call and then reset and enumerates
properly.When same device is used with 2.0 HUB their is no such issue.


logs-->Super-speed

[ 323.912384] usb 2-1: new SuperSpeed USB device number 3 using xhci-hcd
[  323.947103] scsi host1: uas
[  323.948153] scsi 1:0:0:0: Direct-Access     StoreJet TS256GESD400K
  0    PQ: 0 ANSI: 6
[  323.949825] sd 1:0:0:0: [sda] 500118192 512-byte logical blocks:
(256 GB/238 GiB)
[  354.092341] sd 1:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1
inflight: CMD IN
[  354.092380] sd 1:0:0:0: tag#0 CDB: opcode=0x12 12 01 00 00 40 00
[  354.098922] scsi host1: uas_eh_device_reset_handler start
[  354.104963] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for
disabled endpoint or incorrect stream ring
[  354.110095] xhci-hcd xhci-hcd.0.auto: @000000007d41f750 00000000
00000000 1b000000 01078001
[ 354.232398] usb 2-1: reset SuperSpeed USB device number 3 using xhci-hcd
[  354.253844] scsi host1: uas_eh_device_reset_handler success
[  354.263222] sd 1:0:0:0: [sda] Write Protect is off
[  354.263461] sd 1:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[  354.267036] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for
disabled endpoint or incorrect stream ring
[  354.275847] xhci-hcd xhci-hcd.0.auto: @000000007d41fa00 00000000
00000000 1b000000 01038001
[  354.287566]  sda: sda1 sda2
[  354.295407] sd 1:0:0:0: [sda] Attached SCSI disk

logs-->checked with 2.0 hub(same device)

[ 104.292324] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[  104.457236] hub 3-1:1.0: USB hub found
[  104.457305] hub 3-1:1.0: 4 ports detected
[ 105.392323] usb 3-1.4: new high-speed USB device number 3 using xhci-hcd
[  105.545492] scsi host1: uas
[  105.546777] scsi 1:0:0:0: Direct-Access     StoreJet TS256GESD400K
  0    PQ: 0 ANSI: 6
[  105.548876] sd 1:0:0:0: [sda] 500118192 512-byte logical blocks:
(256 GB/238 GiB)
[  105.556591] sd 1:0:0:0: [sda] Write Protect is off
[  105.563321] sd 1:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[  105.570685]  sda: sda1 sda2
[  105.579182] sd 1:0:0:0: [sda] Attached SCSI disk



Digging into issue I found that blk_rq_timed_out_timer() gets calls
and which calls scsi_time_out() and further uas_eh_abort_handler().
[ blk_rq_timed_out_timer() --> blk_rq_check_expired()-->
scsi_times_out()-->scsi_abort_command()--> scmd_eh_abort_handler()-->
scsi_try_to_abort_cmd ()-->uas_eh_abort_handler() ]

Also would like to add whenever we execute read_capacity_16() to read
the capacity of the device suddenly we are receiving
blk_rq_timed_out_timer() and around 30 sec device will reset and
enumerate.

Also there are errors from xhci driver too.


Kernel : 4.4.60 and uas patches cherry-picked from kernel-4.14.13

4.4.60 is _really_ old and obsolete and insecure, and by randomly
cherry-picking patches, we really have no idea what you are running.

Can you duplicate this on 4.14.14?  4.15?

thanks,

greg k-h



--
Best Regards,
Tushar R Nimkar
Mob No : +91-9052258800
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux