UAS mode for TUSB926x under Linux

Hi all,

I'm developing an application using a TUSB9261 chip and the associated demo board.

I would like that the device works in UAS mode under Linux, MacOSX and Windows. It works fine under MacOSX and Windows. But under Linux the device does not work when UAS mode is enabled. It works fine with BOT only.
I test only in USB2.0 mode, I don't try yet in USB3.0

I use a 3.2.0-1-686 linux kernel with UAS support. Maybe the issue will desapear with the next kernel release.
I will keep you informed if I see improvement on this point.
However it seems that the issue comes from TI's firmware since I succeed to use other HDD in UAS mode with the same kernel.

I give you also some debugging informations.

Here is my kernel logs :
[24840.000400] usb 2-2: new high-speed USB device number 22 using ehci_hcd
[24840.133649] usb 2-2: New USB device found, idVendor=0451, idProduct=9261
[24840.133659] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24840.133666] usb 2-2: Product: TUSB9260 Firmware v1
[24840.133671] usb 2-2: Manufacturer: Texas Instruments
[24840.133677] usb 2-2: SerialNumber: 5EC7F79A321BBC3A
[24840.135044] scsi7 : uas
[24840.136037] scsi 7:0:0:0: Direct-Access     ATA                            PQ: 0 ANSI: 6
[24871.008143] sd 7:0:0:0: uas_eh_abort_handler tag 0
[24871.008155] sd 7:0:0:0: uas_eh_device_reset_handler tag 0
[24871.008163] sd 7:0:0:0: uas_eh_target_reset_handler tag 0
[24871.008180] sd 7:0:0:0: uas_eh_bus_reset_handler tag 0
[24871.120075] usb 2-2: reset high-speed USB device number 22 using ehci_hcd
[24871.254638] sd 7:0:0:0: Device offlined - not ready after error recovery
[24871.254722] sd 7:0:0:0: rejecting I/O to offline device
[24871.254743] sd 7:0:0:0: rejecting I/O to offline device
[24871.254754] sd 7:0:0:0: rejecting I/O to offline device
[24871.254762] sd 7:0:0:0: [sdc] READ CAPACITY(16) failed
[24871.254768] sd 7:0:0:0: [sdc]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[24871.254778] sd 7:0:0:0: [sdc] Sense not available.
[24871.254785] sd 7:0:0:0: rejecting I/O to offline device
[24871.254796] sd 7:0:0:0: rejecting I/O to offline device
[24871.254806] sd 7:0:0:0: rejecting I/O to offline device
[24871.254813] sd 7:0:0:0: [sdc] READ CAPACITY failed
[24871.254818] sd 7:0:0:0: [sdc]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[24871.254827] sd 7:0:0:0: [sdc] Sense not available.
[24871.254836] sd 7:0:0:0: rejecting I/O to offline device
[24871.254846] sd 7:0:0:0: rejecting I/O to offline device
[24871.254858] sd 7:0:0:0: rejecting I/O to offline device
[24871.254866] sd 7:0:0:0: [sdc] Write Protect is off
[24871.254873] sd 7:0:0:0: [sdc] Mode Sense: 00 00 00 00
[24871.254881] sd 7:0:0:0: rejecting I/O to offline device
[24871.254889] sd 7:0:0:0: [sdc] Asking for cache data failed
[24871.254895] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[24871.255348] sd 7:0:0:0: [sdc] Attached SCSI removable disk


The device /dev/sdc is not usable :
$ hexedit /dev/sdc
hexedit: /dev/sdc: No such device or address


And the USB descriptor :
Bus 002 Device 022: ID 0451:9261 Texas Instruments, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0451 Texas Instruments, Inc.
  idProduct          0x9261
  bcdDevice            1.00
  iManufacturer           1 Texas Instruments
  iProduct                2 TUSB9260 Firmware v1
  iSerial                 3 5EC7F79A321BBC3A
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           85
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                8mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           4
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     98
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        Status pipe (0x02)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        Command pipe (0x01)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        Data-in pipe (0x03)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        Data-out pipe (0x04)
Device Status:     0x0001
  Self Powered

I will try to debug it by my own in the next weeks. I will try also to give you debug information from the demo board serial port.

Best regards

3 Replies

  • Hello,

    Currently the TUSB9261 with UAS is not working in Ubuntu 11.10 since this version of Ubuntu incorporates a UAS stack. From all the testing we've done, this issue appears to be on Host side  (Ubuntu's UAS stack). We are currently working with the Linux community to resolve this issue.

    Meanwhile, I highly recommend you disable UAS on the TUSB9261 when testing over Ubuntu 11.10, otherwise, the device won't be recognized.

    Best Regards,

    Alexis Cortes.

  • In reply to Alexis Cortes9585:

    Hello Alexis,

    Thank you for your answer.

    However I don't think that the issue comes from the host : I try two external disk with UAS support (not-based on TUSB926x) and they work fine with my Linux kernel. So I think that there might be an issue in the TUSB926x firmware.

    I have to add serial port interface to my TUSB9261 demo board in order to understand what happens on the firmware side. Maybe the debugging message may help us to figure out the problem.

    I will try to do it next week.

    Best regards

  • In reply to badrignans benoit:

    Hello,

    I collected some debug information from TUSB demo board UART. I activate DEBUG_LEVEL to level 3 in the firmware.

    I attach 2 files to this message, both from the TUSB9261 demo board with original firmware (v0.98), configured with TI programmation tool

    • linux3.2.0-2_noUAS : the demo board is configured to use BOT only. There is no issue with Linux and the disk is usable
    • linux3.2.0-2_error : the demo board is configured to use BOT or UAS. The Linux Kernel is not able to handle the device, so the disk is not usable

    I notice few differences :

    Before disk device info :

    [0000000523] -> handle_usb_set_interface() - num = 0, alt = 1.
    [0000000523] -> ums_uas_reset()
    [0000000523] -> ums_uas_init_queue_depth() - 1.

    At the end of the debug :

    [0000007687] -> ums_uas_init_queue_depth() - 32.
    [0000007687] Connected to 1 AHCI device(s).
    [0000030716] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000030717] USB Reset event occurred.
    [0000030717] -> ahci_reset_lun()
    [0000030769] Connected at HIGH speed.
    [0000030769] HS/FS/LS state = (0x0) ON.
    [0000030828] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000030829] USB Reset event occurred.
    [0000030829] -> ahci_reset_lun()
    [0000030881] Connected at HIGH speed.
    [0000030881] HS/FS/LS state = (0x0) ON.
    [0000030937] -> usb_hal_set_address() - addr: 0x10.
    [0000030959] -> handle_usb_set_configuration() - val = 1.
    [0000030959] -> handle_usb_set_interface() - num = 0, alt = 1.
    [0000030959] -> ums_uas_reset()
    [0000030959] -> ums_uas_init_queue_depth() - 32.

    I will try to give you more information in the next weeks

    Best regards

    6404.linux3.2.0-2_noUAS.txt

    6724.linux3.2.0-2_error.txt