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.

AM335x USB DMA issue

Other Parts Discussed in Thread: TUSB9261

Hi,

We got a problem with musb dma transfer.

Here is hardware topology: USB0 is a usb2stata bridge(TUSB9261), USB1 is a usb hub(USB2514B), on this hub there are two smartcard readers.

The ACR39U one (bulk EP maxpacketsize is 64 bytes)  always works. The EMV one(it is AU9560, bulk EP maxpacketsize is 16 bytes) has problems if

bulk transfer more than 64 bytes, this leads to usb hang, cannot recover without a reboot or reloading the usb driver, and both readers become unusable.

Do a bulk transfer with 64 bytes or less to the reader is fine.

Kernel we use is identical to linux-3.2.0-psp04.06.00.08, already applied musb patch 6.1 - 6.7 from http://processors.wiki.ti.com/index.php/Sitara_Linux_MUSB_Issues.

How can I fix this, I don't know much about usb protocol. If more details will be needed, let me know.

# lsusb -v

Bus 002 Device 004: ID 072f:b100  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        16
  idVendor           0x072f
  idProduct          0xb100
  bcdDevice            2.16
  iManufacturer           1 ACS
  iProduct                2 ACR39U ICC Reader
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           93
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 CCID
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              120mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.10  (Warning: Only accurate for version 1.0)
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V
        dwProtocols             3  T=0 T=1
        dwDefaultClock       4800
        dwMaxiumumClock     16000
        bNumClockSupported      0
        dwDataRate          12903 bps
        dwMaxDataRate      826000 bps
        bNumDataRatesSupp.      0
        dwMaxIFSD             247
        dwSyncProtocols  00000000
        dwMechanical     00000000
        dwFeatures       000100B2
          Auto configuration based on ATR
          Auto clock change
          Auto baud rate change
          Auto PPS made by CCID
          TPDU level exchange
        dwMaxCCIDMsgLen       271
        bClassGetResponse    echo
        bClassEnvelope       echo
        wlcdLayout           none
        bPINSupport             0
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              16
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 003: ID 058f:9540  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x058f
  idProduct          0x9540
  bcdDevice            1.20
  iManufacturer           1 Generic
  iProduct                2 EMV Smartcard Reader
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           93
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.10  (Warning: Only accurate for version 1.0)
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V
        dwProtocols             3  T=0 T=1
        dwDefaultClock       3700
        dwMaxiumumClock     12000
        bNumClockSupported      3
        dwDataRate           9946 bps
        dwMaxDataRate      688172 bps
        bNumDataRatesSupp.    138
        dwMaxIFSD             254
        dwSyncProtocols  00000007  2-wire 3-wire I2C
        dwMechanical     00000000
        dwFeatures       000404BE
          Auto configuration based on ATR
          Auto activation on insert
          Auto voltage selection
          Auto clock change
          Auto baud rate change
          Auto PPS made by CCID
          Auto IFSD exchange
          Short and extended APDU level exchange
        dwMaxCCIDMsgLen       272
        bClassGetResponse    echo
        bClassEnvelope       echo
        wlcdLayout           none
        bPINSupport             0
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               0
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 002: ID 0424:2514  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9
  bDeviceSubClass         0
  bDeviceProtocol         2
  bMaxPacketSize0        64
  idVendor           0x0424
  idProduct          0x2514
  bcdDevice            b.b3
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9
      bInterfaceSubClass      0
      bInterfaceProtocol      1
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9
      bInterfaceSubClass      0
      bInterfaceProtocol      2
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             2
  wHubCharacteristic 0x0009
    Per-port power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      1 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0103 power enable connect
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 002: ID 0451:9261  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0451
  idProduct          0x9261
  bcdDevice            1.00
  iManufacturer           1 Texas Instruments
  iProduct                2 TUSB9261 USB3.0 to SATA Bridge
  iSerial                 3 D0A33CD7DE75FDED10514473262694EB6
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8
      bInterfaceSubClass      6
      bInterfaceProtocol     80
      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
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           42
  bNumDeviceCaps          3
  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        2047 micro seconds
  Container ID Device Capability:
    bLength                20
    bDescriptorType        16
    bDevCapabilityType      4
    bReserved               0
    ContainerID             {0d12c35c-1f92-e35c-ed57-dfde0d3ac37d}
Device Status:     0x0000
  (Bus Powered)

Bus 002 Device 001: ID 1d6b:0002  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9
  bDeviceSubClass         0
  bDeviceProtocol         1
  bMaxPacketSize0        64
  idVendor           0x1d6b
  idProduct          0x0002
  bcdDevice            3.02
  iManufacturer           3 Linux 3.2.0 musb-hcd
  iProduct                2 MUSB HDRC host driver
  iSerial                 1 musb-hdrc.1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0011
    Per-port power switching
    No overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        5 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9
  bDeviceSubClass         0
  bDeviceProtocol         1
  bMaxPacketSize0        64
  idVendor           0x1d6b
  idProduct          0x0002
  bcdDevice            3.02
  iManufacturer           3 Linux 3.2.0 musb-hcd
  iProduct                2 MUSB HDRC host driver
  iSerial                 1 musb-hdrc.0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0011
    Per-port power switching
    No overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        5 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
Device Status:     0x0001
  Self Powered

# cat /proc/driver/musb_hdrc1

Status: MHDRC, Mode=Host (Power=f0, DevCtl=5d)
OTG state: a_host; active
Options: ?dma?, otg (peripheral+host), [eps=16]
Peripheral address: 00
Root port status: 00000503
CPPI: txcr=0 txsrc=0 txena=0; rxcr=0 rxsrc=280de80 rxena=0

RX10: 1buf rxcsr 3020 interval 0c max 0001 type 71; dev 2 hub 0 port 0
    rx dma9: 0 left, 00000000 00000000, 00000000 00000000; 00000000 00000000 00000000 .. 00000000
    qh df299a40 dev2 ep1-int max1
        in urb df2efc40 0/1

RX11: 1buf rxcsr 3220 interval 10 max 0008 type b3; dev 4 hub 130 port 2
    rx dma10: 0 left, 00100000 00000000, ffffffff 00000000; 20000000 16808000 3f9f4450 .. 00000003
    qh df559900 dev4 ep3-int max8
        in urb df568f40 0/8

RX12: 1buf rxcsr 3220 interval 20 max 0004 type b1; dev 3 hub 130 port 1
    rx dma11: 0 left, 00000000 00000000, 00000000 00000000; 00000000 00000000 00000000 .. 00000000
    qh df5598c0 dev3 ep1-int max4
        in urb df568e40 0/8

# on problem occurs
# reader with maxpacket=16
RX2: 1buf rxcsr 2020 interval 00 max 0010 type a3; dev 3 hub 130 port 1
    rx dma1: 270926084 left,00000000 00000000, 00000000 00000000; 00000000 00000000 00000000 .. 00000000
    qh df4a84c0 dev3 ep3-bulk max16
        in urb df4c4140 0/10

# reader with maxpacket=64
RX2: 1buf rxcsr 2020 interval 00 max 0040 type a2; dev 4 hub 130 port 2
    rx dma1: 270926084 left,00000000 00000000, 00000000 00000000; 00000000 00000000 00000000 .. 00000000
    qh df4a84c0 dev4 ep2-bulk max64
        in urb df4c4140 0/16384
        in urb df4c40c0 0/16384
        in urb df4c42c0 0/16384
        in urb df4c4540 0/16384
        in urb df4c4240 0/20


#regdump after problem occurs

MUSB (M)HDRC Register Dump
FAddr       : 00
Power       : f0
Frame       : 0608
Index       : 0f
Testmode    : 00
TxMaxPp     : 0000
TxCSRp      : 0000
RxMaxPp     : 0000
RxCSR       : 0000
RxCount     : 0000
ConfigData  : 33
DevCtl      : 5d
MISC        : 44
TxFIFOsz    : 07
RxFIFOsz    : 07
TxFIFOadd   : 0780
RxFIFOadd   : 0780
VControl    : 00000000
HWVers      : 0800
EPInfo      : ff
RAMInfo     : 0d
LinkInfo    : 5c
VPLen       : 3c
HS_EOF1     : 80
FS_EOF1     : 77
LS_EOF1     : 72
SOFT_RST    : 00
DMA_CNTLch0 : 0000
DMA_ADDRch0 : 00000000
DMA_COUNTch0: 00000000
DMA_CNTLch1 : 0000
DMA_ADDRch1 : 00000000
DMA_COUNTch1: 00000000
DMA_CNTLch2 : 0000
DMA_ADDRch2 : 00000000
DMA_COUNTch2: 00000000
DMA_CNTLch3 : 0000
DMA_ADDRch3 : 00000000
DMA_COUNTch3: 00000000
DMA_CNTLch4 : 0000
DMA_ADDRch4 : 00000000
DMA_COUNTch4: 00000000
DMA_CNTLch5 : 0000
DMA_ADDRch5 : 00000000
DMA_COUNTch5: 00000000
DMA_CNTLch6 : 0000
DMA_ADDRch6 : 00000000
DMA_COUNTch6: 00000000
DMA_CNTLch7 : 0000
DMA_ADDRch7 : 00000000
DMA_COUNTch7: 00000000

  • Hi,

    No matter what dma transfer problem you have, you have to move to the latest psp package for the linux-3.2.0 kernel.
    psp4.6.0.8 is too old, it does not have many musb bug fixes, which already exists in psp4.6.0.11.
  • Sorry, I've no idea why the previous post is cut from the url link. I've edited the post.
    I'll try with psp4.6.0.11 kernel. Thank you for your reply.
  • Hi,

    I've compared psp4.6.0.11 with ours, didn't find much difference except some drivers. kernel we use is not strictly psp4.6.0.08,
    I don't know what psp version it is based on, it is patched, mostly i2c and gpio device drivers etc, usb subsystem stays untouched.
    I simply replaced drivers/usb of kernel source tree with the source from psp4.6.0.11, still got the issue.
    The first post should still apply.

    dmesg:
    [ 0.120658] usbcore: registered new interface driver usbfs
    [ 0.120971] usbcore: registered new interface driver hub
    [ 0.121171] usbcore: registered new device driver usb
    [ 0.121539] musb-ti81xx musb-ti81xx: musb0, board_mode=0x11, plat_mode=0x1
    [ 0.121852] musb-ti81xx musb-ti81xx: musb1, board_mode=0x11, plat_mode=0x1
    [ 0.209495] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.209657] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [ 0.210001] musb0: Enabled SW babble control
    [ 0.210307] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 0.210327] musb-hdrc: MHDRC RTL version 2.0
    [ 0.210338] musb-hdrc: setup fifo_mode 4
    [ 0.210369] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 0.210384] musb-hdrc.0: bulk split disabled
    [ 0.210393] musb-hdrc.0: bulk combine disabled
    [ 0.210485] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [ 0.210591] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [ 0.210731] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.210747] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.210761] usb usb1: Product: MUSB HDRC host driver
    [ 0.210772] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [ 0.210783] usb usb1: SerialNumber: musb-hdrc.0
    [ 0.212439] musb-hdrc musb-hdrc.0: USB Host mode controller at e083e000 using DMA, IRQ 18
    [ 0.212621] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    [ 0.212980] musb1: Enabled SW babble control
    [ 0.213278] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [ 0.213297] musb-hdrc: MHDRC RTL version 2.0
    [ 0.213307] musb-hdrc: setup fifo_mode 4
    [ 0.213336] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [ 0.213350] musb-hdrc.1: bulk split disabled
    [ 0.213359] musb-hdrc.1: bulk combine disabled
    [ 0.213432] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 0.213481] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [ 0.213579] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.213594] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.213607] usb usb2: Product: MUSB HDRC host driver
    [ 0.213618] usb usb2: Manufacturer: Linux 3.2.0 musb-hcd
    [ 0.213628] usb usb2: SerialNumber: musb-hdrc.1
    [ 0.215076] musb-hdrc musb-hdrc.1: USB Host mode controller at e084a800 using DMA, IRQ 19
    [ 1.301342] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 1.512149] usb 1-1: New USB device found, idVendor=0451, idProduct=9261
    [ 1.519140] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 1.526591] usb 1-1: Product: TUSB9261 USB3.0 to SATA Bridge
    [ 1.532498] usb 1-1: Manufacturer: Texas Instruments
    [ 1.537670] usb 1-1: SerialNumber: D0A33CD7DE75FDED10514473262694EB6
    [ 1.701923] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [ 1.864862] usb 2-1: New USB device found, idVendor=0424, idProduct=2514
    [ 1.871866] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [ 2.211952] usb 2-1.1: new full-speed USB device number 3 using musb-hdrc
    [ 2.355022] usb 2-1.1: New USB device found, idVendor=058f, idProduct=9540
    [ 2.362206] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 2.369824] usb 2-1.1: Product: EMV Smartcard Reader
    [ 2.375006] usb 2-1.1: Manufacturer: Generic
    [ 2.501750] usb 2-1.2: new full-speed USB device number 4 using musb-hdrc
    [ 2.644973] usb 2-1.2: New USB device found, idVendor=072f, idProduct=b100
    [ 2.652156] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 2.659774] usb 2-1.2: Product: ACR39U ICC Reader
    [ 2.664683] usb 2-1.2: Manufacturer: ACS
    [ 4.191252] usbcore: registered new interface driver zd1201
    [ 4.197246] usbcore: registered new interface driver cdc_ether
    [ 4.203503] usbcore: registered new interface driver cdc_eem
    [ 4.209551] usbcore: registered new interface driver dm9601
    [ 4.218944] usbcore: registered new interface driver cdc_ncm
    [ 4.239770] usbcore: registered new interface driver uas
    [ 4.250721] scsi0 : usb-storage 1-1:1.0
    [ 4.255802] usbcore: registered new interface driver usb-storage
    [ 4.431250] usbcore: registered new interface driver usbhid
    [ 4.437085] usbhid: USB HID core driver
  • Hi,

    Can you please test with the latest Processor SDK3 kernel to see if the issue happens?
  • I doubt we can migrate to latest SDK3 kernel.

    So can you please give some suggestions on what might be the cause of that issue?

  • Hi,

    I am not sure what the problem is from the information you provided, I haven't heard any new issues for a very long time on psp 4.6.0.11 plus the 7 patches you applied from the wiki.
  • Hi,

    Can you please try a test? Since the bulk packet size is only about 16 or 64 bytes, really small for high-speed transfers, can you please disable MUSB CPPI DMA in kernel menuconfig and test if the issue still happens?

  • With CDMA disabled, there's no problem. The CPPI DMA is enabled recently since we added the harddisk storage.
    I may miss one thing, I didn't apply the 7 patches to psp 4.6.0.11 kernel. I'll retest with psp 4.6.0.11 kernel plus the 7 patches.
  • you mentioned high-speed transfers, as I can tell, the two smartcard readers on the hub only support full-speed.
  • confirm the issue using psp 4.6.0.11 kernel with musb patches 6.1 - 6.7.

  • Hi,

    This 3.2 kernel psp is very old and no longer supported. But I could try to make a hack patch for your use case which only enables CPPI DMA for USB0, but disables CPPI for USB1. Is it acceptable?

  • That'll do.

    Thank you, Bin
  • Please try the following untested patch.

    diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
    index fea57f873859..69b73380b4e7 100644
    --- a/drivers/usb/musb/musb_host.c
    +++ b/drivers/usb/musb/musb_host.c
    @@ -774,7 +774,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
            void __iomem            *epio = hw_ep->regs;
            struct musb_qh          *qh = musb_ep_get_qh(hw_ep, !is_out);
            u16                     packet_sz = qh->maxpacket;
    -       u8                      use_dma = 1;
    +       u8                      use_dma = musb->id ? 0 : 1;
            u16                     csr;
    
            dev_dbg(musb->controller, "%s hw%d urb %p spd%d dev%d ep%d%s "
    
  • Hi, Bin

    Tested your patch in our case, it works. It also improves disk performance on USB0 dma.
    Since kernel 3.2 is no longer supported, I will merge your patch in our products.

    Thank you
  • Thanks for the update. Glad we found a workaround for the issue!