This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UAS mode for TUSB926x under Linux

Other Parts Discussed in Thread: TUSB9261, TUSB9260

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

  • 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.

  • 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

  • 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
    ========================================================
    ||   TUSB9260 Firmware v0.98 [Feb 20 2012 17:51:15]   ||
    ||                 Device ID: 0x0000                  ||
    ========================================================
    
     Reset Flag(s): [Power-Up]
    
    [0000000001] Datapath RAM Usage: 80144 / 81920 bytes.
    [0000000001] Supported NCQ Depth: 32
    [0000000001] EP2-IN TRB ptr = 0xc0012cb0
    [0000000001] EP2-OUT TRB ptr = 0xc0012cf0
    [0000000001] EP3-IN TRB Ring ptr = 0xc0012d10
    [0000000001] EP3-OUT TRB Ring ptr = 0xc0012dc0
    [0000000001] Scrambling: ON
    [0000000001] U1/U2 Transistions: OFF
    [0000000001] USB PHY Suspend: ON
    [0000000001] SATA LPM: OFF
    [0000000002] System Clock Gating: ON
    [0000000002] Device is Bus-powered.
    [0000000002] -> usb_hal_init()
    [0000000002] USB Core Ver: 0x120a.
    [0000000002] USB SSC is OFF (GPIO-11 controlled).
    [0000000052] -> usb_hal_connect()
    [0000000052[0000000052] LTSSM state = (0x5) RX DETECT.
    ] -> ahci_init()
    [0000000052] -> ahci_hba_reset()
    [0000000052] SATA Gen-2 speed negotiated.
    [0000000151] HS/FS/LS state = (0x0) ON.
    [0000000154] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000000157] HS/FS/LS state = (0x3) SUSPEND.
    [0000000276] USB Reset event occurred.
    [0000000332] Connected at HIGH speed.
    [0000000332] HS/FS/LS state = (0x0) ON.
    [0000000391] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000000391] USB Reset event occurred.
    [0000000443] Connected at HIGH speed.
    [0000000443] HS/FS/LS state = (0x0) ON.
    [0000000499] -> usb_hal_set_address() - addr: 0x11.
    [0000000523] -> handle_usb_set_configuration() - val = 1.
    [0000007542] 
    [0000007542] ================================================
    [0000007542]              IDENTIFY DEVICE INFO
    [0000007542] ================================================
    [0000007542] 
    [0000007542]   Model:  WDC WD10TPVT-00U4RT1                    
    [0000007542]   FW Rev: 01.01A01
    [0000007542]   Serial:      WD-WXA1A71R2511
    [0000007542] 
    [0000007542]   Spec Compliance: ATA/ATAPI-3
    [0000007542]   ATAPI: No
    [0000007542]   Removable Media: No
    [0000007542]   Rotational Speed = 5200 RPM
    [0000007542]   UDMA Modes = 0x007f
    [0000007542]   PIO Modes = 0x0003
    [0000007542] 
    [0000007542]   LBA48: Yes
    [0000007542]   Max LBA = 0x00000000 3a3836d8
    [0000007543]   Write FUA: No
    [0000007543]   World Wide Name = 0x50014ee2 5b83c0d8
    [0000007543] 
    [0000007543]   SATA Gen 2 (3.0 Gb/s): Yes
    [0000007543]   NCQ Support: Yes
    [0000007543]   Queue Depth = 31
    [0000007543]   TRIM Support: No
    [0000007543] 
    [0000007543]   Logical Sector Size = 512 bytes
    [0000007543]   Physical Sector Size = 4096 bytes
    [0000007543]   Logical Sector Offset = 0
    [0000007543] 
    [0000007543] ================================================
    
    [0000007728] Connected to 1 AHCI device(s).
    [0000007731] -> ums_bot_send_CSW() - status = FAILED. CDB[0] = 0x00.
    [0000007732] -> ums_bot_case_handler() - case 5.
    [0000007740] -> ums_bot_case_handler() - case 5.
    [0000007748] -> ums_bot_case_handler() - case 5.
    [0000007758] -> ums_bot_case_handler() - case 5.
    [0000007766] -> ums_bot_case_handler() - case 5.
    [0000007789] -> ums_bot_case_handler() - case 5.
    [0000007797] -> ums_bot_case_handler() - case 5.
    [0000007806] -> ums_bot_case_handler() - case 5.
    
    

    6724.linux3.2.0-2_error.txt
    ========================================================
    ||   TUSB9260 Firmware v0.98 [Feb 20 2012 17:51:15]   ||
    ||                 Device ID: 0x0000                  ||
    ========================================================
    
     Reset Flag(s): [Power-Up]
    
    [0000000001] Datapath RAM Usage: 80144 / 81920 bytes.
    [0000000001] Supported NCQ Depth: 32
    [0000000001] EP2-IN TRB ptr = 0xc0012cb0
    [0000000001] EP2-OUT TRB ptr = 0xc0012cf0
    [0000000001] EP3-IN TRB Ring ptr = 0xc0012d10
    [0000000001] EP3-OUT TRB Ring ptr = 0xc0012dc0
    [0000000001] Scrambling: ON
    [0000000001] U1/U2 Transistions: OFF
    [0000000001] USB PHY Suspend: ON
    [0000000001] SATA LPM: OFF
    [0000000002] System Clock Gating: ON
    [0000000002] Device is Bus-powered.
    [0000000002] -> usb_hal_init()
    [0000000002] USB Core Ver: 0x120a.
    [0000000002] USB SSC is OFF (GPIO-11 controlled).
    [0000000052] -> usb_hal_connect()
    [0000000052[0000000052] LTSSM state = (0x5) RX DETECT.
    ] -> ahci_init()
    [0000000052] -> ahci_hba_reset()
    [0000000052] SATA Gen-2 speed negotiated.
    [0000000150] HS/FS/LS state = (0x0) ON.
    [0000000153] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000000156] HS/FS/LS state = (0x3) SUSPEND.
    [0000000276] USB Reset event occurred.
    [0000000331] Connected at HIGH speed.
    [0000000331] HS/FS/LS state = (0x0) ON.
    [0000000390] HS/FS/LS state = (0x5) EARLY SUSPEND.
    [0000000391] USB Reset event occurred.
    [0000000447] Connected at HIGH speed.
    [0000000447] HS/FS/LS state = (0x0) ON.
    [0000000499] -> usb_hal_set_address() - addr: 0x10.
    [0000000523] -> handle_usb_set_configuration() - val = 1.
    [0000000523] -> handle_usb_set_interface() - num = 0, alt = 1.
    [0000000523] -> ums_uas_reset()
    [0000000523] -> ums_uas_init_queue_depth() - 1.
    [0000000525] -> ums_uas_send_sense_iu() - cmd_index = 0, status = 0x02, TAG = 0x0000, CDB[0] = 0x00, retry = N.
    [0000007501] 
    [0000007501] ================================================
    [0000007501]              IDENTIFY DEVICE INFO
    [0000007501] ================================================
    [0000007501] 
    [0000007501]   Model:  WDC WD10TPVT-00U4RT1                    
    [0000007501]   FW Rev: 01.01A01
    [0000007501]   Serial:      WD-WXA1A71R2511
    [0000007501] 
    [0000007501]   Spec Compliance: ATA/ATAPI-3
    [0000007501]   ATAPI: No
    [0000007501]   Removable Media: No
    [0000007501]   Rotational Speed = 5200 RPM
    [0000007501]   UDMA Modes = 0x007f
    [0000007501]   PIO Modes = 0x0003
    [0000007501] 
    [0000007501]   LBA48: Yes
    [0000007501]   Max LBA = 0x00000000 3a3836d8
    [0000007501]   Write FUA: No
    [0000007501]   World Wide Name = 0x50014ee2 5b83c0d8
    [0000007502] 
    [0000007502]   SATA Gen 2 (3.0 Gb/s): Yes
    [0000007502]   NCQ Support: Yes
    [0000007502]   Queue Depth = 31
    [0000007502]   TRIM Support: No
    [0000007502] 
    [0000007502]   Logical Sector Size = 512 bytes
    [0000007502]   Physical Sector Size = 4096 bytes
    [0000007502]   Logical Sector Offset = 0
    [0000007502] 
    [0000007502] ================================================
    [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.