Re: ERROR: unexpected command completion code 0x11 for DJ-Tech CTRL (resending as plain text ;)

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

 



Hello Mathias,


On 23.12.19 13:14, Mathias Nyman wrote:

The Maximum Packet Size of the full-speed bulk endpoint looks a bit suspicious (maxp 4)

12478.521580: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk OUT burst 0 maxp 4 deq 00000000fff71001

For full speed bulk endpoints only support 8, 16, 32 and 64 bytes Max Packet sizes. Host are not required to support other values. See USB2 spec section 5.8.3 for details

thanks for the explanation!


Maybe forcing it to one of the allowed values could work.
Does the below hack help? (untested)?

diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 3b1388fa2f36..29102776baed 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1476,8 +1476,12 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
         if (!usb_endpoint_xfer_isoc(&ep->desc))
                 err_count = 3;
         /* Some devices get this wrong */
-       if (usb_endpoint_xfer_bulk(&ep->desc) && udev->speed == USB_SPEED_HIGH)
-               max_packet = 512;
+       if (usb_endpoint_xfer_bulk(&ep->desc) {

I changed this line for missing closing bracket...


+                       if (udev->speed == USB_SPEED_HIGH)
+                               max_packet = 512;
+                       if (udev->speed == USB_SPEED_FULL)
+                               max_packet = 1 << (fls(clamp_val(max_packet, 8, 64)) - 1);
+               }
        /* xHCI 1.0 and 1.1 indicates that ctrl ep avg TRB Length should be 8 */         if (usb_endpoint_xfer_control(&ep->desc) && xhci->hci_version >= 0x100)
                 avg_trb_len = 8;

...and with the new kernel, connecting the device works [1], and lsusb reports the device as well. [2]

Only thing that looks different on my workstation is this

-  iManufacturer           1 (error)
-  iProduct                2 (error)
-  iSerial                 3 (error)
+  iManufacturer           1
+  iProduct                2
+  iSerial                 3


Now, I had connected the device after reboot with the new kernel and went afk for 4h. When I returned, aseqdump did not show anything.

But after reconnecting the device, I can read data from it with aseqdump and also use the device in mixxx.

I can't put my finger on why it stopped working, and I will probably have to have a closer look at this during the next days, but at first glance it may not be related to USB at all.

So for now I'll say the hack gets the device to work. Thank you very much for your help!


-René



[1]
[15189.483381] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.486515] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.489512] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.492514] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.493396] usb 3-2.3: New USB device found, idVendor=2485, idProduct=504f, bcdDevice= 2.54 [15189.493400] usb 3-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15189.493402] usb 3-2.3: Product: CTRL
[15189.493404] usb 3-2.3: Manufacturer: CTRL
[15189.493406] usb 3-2.3: SerialNumber: CTRL
[15189.493683] xhci_hcd:xhci_add_endpoint:1917: xhci_hcd 0000:05:00.4: add ep 0x1, slot id 9, new drop flags = 0x0, new add flags = 0x5 [15189.493703] xhci_hcd:xhci_add_endpoint:1917: xhci_hcd 0000:05:00.4: add ep 0x81, slot id 9, new drop flags = 0x0, new add flags = 0xd [15189.493709] xhci_hcd:xhci_check_bandwidth:2878: xhci_hcd 0000:05:00.4: xhci_check_bandwidth called for udev 00000000972d7af8 [15189.493716] xhci_hcd:xhci_ring_cmd_db:282: xhci_hcd 0000:05:00.4: // Ding dong! [15189.493773] xhci_hcd:xhci_dbg_trace:31: xhci_hcd 0000:05:00.4: Successful Endpoint Configure command [15189.493781] xhci_hcd:xhci_ring_cmd_db:282: xhci_hcd 0000:05:00.4: // Ding dong! [15189.493818] xhci_hcd:handle_tx_event:2395: xhci_hcd 0000:05:00.4: Stopped on No-op or Link TRB for slot 9 ep 1 [15189.493828] xhci_hcd:xhci_ring_cmd_db:282: xhci_hcd 0000:05:00.4: // Ding dong! [15189.493869] xhci_hcd:xhci_ring_cmd_db:282: xhci_hcd 0000:05:00.4: // Ding dong! [15189.493918] xhci_hcd:handle_tx_event:2395: xhci_hcd 0000:05:00.4: Stopped on No-op or Link TRB for slot 9 ep 2 [15189.493926] xhci_hcd:xhci_ring_cmd_db:282: xhci_hcd 0000:05:00.4: // Ding dong! [15189.497485] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.500488] xhci_hcd:process_ctrl_td:2094: xhci_hcd 0000:05:00.4: Waiting for status stage event [15189.564944] xhci_hcd:process_bulk_intr_td:2257: xhci_hcd 0000:05:00.4: ep 0x87 - asked for 16384 bytes, 16068 bytes untransferred [15191.568180] xhci_hcd:process_bulk_intr_td:2257: xhci_hcd 0000:05:00.4: ep 0x87 - asked for 16384 bytes, 16068 bytes untransferred [15193.571621] xhci_hcd:process_bulk_intr_td:2257: xhci_hcd 0000:05:00.4: ep 0x87 - asked for 16384 bytes, 16068 bytes untransferred




[2]
Bus 003 Device 011: ID 2485:504f
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x2485
  idProduct          0x504f
  bcdDevice            2.54
  iManufacturer           1 (error)
  iProduct                2 (error)
  iSerial                 3 (error)
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0053
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0
      iInterface              0
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength       0x0041
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                   0
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 3
        bNrInputPins            1
        baSourceID( 0)          2
        BaSourcePin( 0)         1
        iJack                   0
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 4
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                   0
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       1
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       3



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

  Powered by Linux