Re: UAS errors with Jmicron

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

 



Hi,

On 09/07/2014 04:36 PM, Laszlo T. wrote:
> 2014-08-04 20:07 GMT+02:00 Hans de Goede <hdegoede@xxxxxxxxxx>:
>> Hi Laszlo,
>>
>> On 08/03/2014 12:40 AM, Laszlo T. wrote:
>>>>>>>> *) usb devices return different descriptors at different speeds
>>>>>>>
>>>>>>> All tests were on usb2.
>>>>>>> I don't have usb3 ports but I will try that at weekend.
>>>>>>>
>>>>>>> I'm curious now, am I the first one who has ever tested uas on usb2?
>>>>>>
>>>>>> Ni, I've tested it myself too, including running an entire distro
>>>>>> with gnome3 from an uas disk.
>>>>>>
>>>>>> I'll also do some more tests with mkfs.ext4 with my uas disk enclosures
>>>>>> as that seems to trigger things for you. But for me so far using usb2 is
>>>>>> not a problem.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Hans
>>>>>
>>>>> It looks stable with
>>>>> can_queue = 65536 and qdepth = 32
>>>>> on usb2.
>>>>
>>>> That is good to hear.
>>>>
>>>>> Please share you result when you have chance to test with your enclosure.
>>>>
>>>> I've tested 2 different uas enclosures with 3 different disks on usb2,
>>>> running mkfs.ext4 on a single partition spanning the entire disk, and
>>>> I could not reproduce, so this seems to be specific to the jmicron
>>>> chipset your using. Still there is little in harm in just always reducing
>>>> the usb2 qdepth to 32, that should be plenty to keep things close to maximum
>>>> possible throughput on usb2.
>>>>
>>>> I'll write a patch for this and I'll Cc. you on the patch.
>>>
>>> Thank you.
>>>
>>> I could tested the device on USB 3.0 with an unpatched 3.15.5 kernel
>>> and unfortunately it failed with the usual error.
>>>
>>>
>>> lsusb on usb3
>>>
>>> Bus 002 Device 002: ID 152d:0567 JMicron Technology Corp. / JMicron
>>> USA Technology Corp.
>>> Device Descriptor:
>>>   bLength                18
>>>   bDescriptorType         1
>>>   bcdUSB               2.10
>>
>> Thanks for the log, but this indicates that the device is still
>> connected at usb-2 speed, so either you did not use an
>> usb-3 cable, or the port you used was not superspeed
>> capable (or it ended up falling back to usb-2 for some
>> other reason).
>>
>> And since this is an otherwise unmodified kernel, that
>> explains why you get the old troublesome behavior in this
>> case.
>>
>> When connected over USB-3 I would expect this to read:
>>
>>   bcdUSB               3.00
>>
>>
>> Another way to check the speed is to do lsusb:
>>
>> [hans@shalem ~]$ lsusb
>> Bus 009 Device 002: ID 045b:021f Hitachi, Ltd
>> Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
>> Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>
>> Note how the "Hitachi, Ltd" device is on the same Bus as the
>> "Linux Foundation 3.0 root hub"
>>
>> If that is not the case for a device, then it is not connected
>> over USB-3.
>>
>> Regards,
>>
>> Hans
> 
> Hello,
> 
> I bought a new desktop machine. So I have finally USB3.0.
> 
> I tried with different USB 3.0 cables and different USB3.0 ports but I
> still get the 'bcdUSB 2.10'.
> Maybe this is another bug.
> 
> On 3.14 + FUA disabler patch:
> 
> [  130.576495] usb 1-4: new high-speed USB device number 5 using xhci_hcd
> [  130.789822] usb 1-4: New USB device found, idVendor=152d, idProduct=0567
> [  130.789827] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [  130.789830] usb 1-4: Product: USB to ATA/ATAPI Bridge
> [  130.789832] usb 1-4: Manufacturer: JMicron
> [  130.789834] usb 1-4: SerialNumber: 74D781114413108
> [  130.808397] usb-storage 1-4:1.0: USB Mass Storage device detected
> [  130.808467] usb-storage 1-4:1.0: Quirks match for vid 152d pid 0567: 1000000
> [  130.808499] scsi6 : usb-storage 1-4:1.0
> [  130.808551] usbcore: registered new interface driver usb-storage
> [  131.808755] scsi 6:0:0:0: Direct-Access     JMicron  Generic
>   0114 PQ: 0 ANSI: 6
> [  131.808986] sd 6:0:0:0: Attached scsi generic sg2 type 0
> [  131.809895] sd 6:0:0:0: [sdc] Spinning up disk...
> [  132.812230] ....ready
> [  135.824326] sd 6:0:0:0: [sdc] 976773168 512-byte logical blocks:
> (500 GB/465 GiB)
> [  135.824605] sd 6:0:0:0: [sdc] Write Protect is off
> [  135.824607] sd 6:0:0:0: [sdc] Mode Sense: 47 00 10 08
> [  135.824862] sd 6:0:0:0: [sdc] Disabling FUA
> [  135.824863] sd 6:0:0:0: [sdc] Write cache: enabled, read cache:
> enabled, doesn't support DPO or FUA
> [  135.825651] sd 6:0:0:0: [sdc] Disabling FUA
> [  135.857366]  sdc: sdc1 sdc2
> [  135.858448] sd 6:0:0:0: [sdc] Disabling FUA
> [  135.858450] sd 6:0:0:0: [sdc] Attached SCSI disk
> [  136.054842] EXT4-fs (sdc1): mounted filesystem with ordered data
> mode. Opts: (null)
> [  136.107262] EXT4-fs (sdc2): mounted filesystem with ordered data
> mode. Opts: (null)
> 
> On 3.17-rc3:
> 
> [  448.319075] usb 1-3: new high-speed USB device number 5 using xhci_hcd

The "high speed" here indicates that you're really getting usb-2 speed and
not usb-3, so the bcdUSB is correct / as expected.

> [  448.504438] usb 1-3: New USB device found, idVendor=152d, idProduct=0567
> [  448.504440] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [  448.504442] usb 1-3: Product: USB to ATA/ATAPI Bridge
> [  448.504442] usb 1-3: Manufacturer: JMicron
> [  448.504443] usb 1-3: SerialNumber: 74D781114413108
> [  448.512143] usbcore: registered new interface driver usb-storage
> [  448.513173] scsi host6: uas
> [  448.513210] usbcore: registered new interface driver uas
> [  448.513541] scsi 6:0:0:0: Direct-Access     JMicron  Generic
>   0114 PQ: 0 ANSI: 6
> [  448.514180] sd 6:0:0:0: Attached scsi generic sg2 type 0
> [  448.514429] sd 6:0:0:0: [sdc] Spinning up disk...
> [  449.514370] .....ready
> [  453.528396] sd 6:0:0:0: [sdc] 976773168 512-byte logical blocks:
> (500 GB/465 GiB)
> [  453.528401] sd 6:0:0:0: [sdc] 4096-byte physical blocks
> [  453.529017] sd 6:0:0:0: [sdc] Write Protect is off
> [  453.529021] sd 6:0:0:0: [sdc] Mode Sense: 53 00 10 08
> [  453.529293] sd 6:0:0:0: [sdc] Write cache: enabled, read cache:
> enabled, supports DPO and FUA
> [  453.566715]  sdc: sdc1 sdc2
> [  453.568528] sd 6:0:0:0: [sdc] Attached SCSI disk
> [  453.819595] EXT4-fs (sdc1): mounted filesystem with ordered data
> mode. Opts: (null)
> [  453.871620] EXT4-fs (sdc2): mounted filesystem with ordered data
> mode. Opts: (null)
> [  455.095212] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
> [  459.080893] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
> [  463.066543] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
> [  467.052302] usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
> [  467.052397] usb usb2-port3: unable to enumerate USB device

It could be that usb2 is your superspeed bus (the highspeed and superspeed
connections are seen as 2 separate busses.

Since you've already tried different cables and ports, the most likely
cause of this problem is that there is something wrong with the usb-3
connector on your disk enclosure. There is nothing we can do there
I'm afraid.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux