I am curious if anyone has the OTG (upper USB2) port working on Rock64.
I do not want any fancy from it, just have it work in host mode.
So far, not much luck.
I've tried it only umass devices and either drives fail to probe or get detached shortly after attaching.

Here is a typical scenario:
May 19 09:02:15 rock64b kernel: usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device USBest Technology USB Mass Storage Device (0x1307:0x0163) May 19 09:02:16 rock64b kernel: usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_TIMEOUT, ignored) May 19 09:02:26 rock64b kernel: usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT

May 19 09:02:27 rock64b kernel: ugen0.2: <USBest Technology USB Mass Storage Device> at usbus0
May 19 09:02:27 rock64b kernel: umass0 on uhub3
May 19 09:02:27 rock64b kernel: umass0: <USBest Technology USB Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on usbus0 May 19 09:02:27 rock64b kernel: umass0: SCSI over Bulk-Only; quirks = 0x8000<NO_PREVENT_ALLOW>
May 19 09:02:27 rock64b kernel: umass0:2:0: Attached to scbus2
May 19 09:02:27 rock64b kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
May 19 09:02:27 rock64b kernel: da0: <JetFlash TS4GJFV60 0.00> Removable Direct Access SCSI-2 device
May 19 09:02:27 rock64b kernel: da0: Serial Number 2000cd60122411
May 19 09:02:27 rock64b kernel: da0: 40.000MB/s transfers
May 19 09:02:27 rock64b kernel: da0: 3935MB (8060927 512 byte sectors)
May 19 09:02:27 rock64b kernel: da0: quirks=0x2<NO_6_BYTE>

May 19 09:02:27 rock64b kernel: ugen0.2: <USBest Technology USB Mass Storage Device> at usbus0 (disconnected)
May 19 09:02:27 rock64b kernel: umass0: at uhub3, port 1, addr 2 (disconnected)
May 19 09:02:27 rock64b kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 7a ff fe 00 00 01 00 May 19 09:02:27 rock64b kernel: (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error May 19 09:02:27 rock64b kernel: (da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
May 19 09:02:27 rock64b kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
May 19 09:02:27 rock64b kernel: da0: <JetFlash TS4GJFV60 0.00> s/n 2000cd60122411 detached May 19 09:02:27 rock64b kernel: g_dev_taste: g_dev_taste(da0) failed to g_attach, error=6
May 19 09:02:27 rock64b kernel: (da0:umass-sim0:0:0:0): Periph destroyed
May 19 09:02:27 rock64b kernel: umass0: detached

Note a 10 second delay between "set address failed" and "getting device descriptor at addr 2 failed".
Nevertheless umass0 gets attached and da0 gets correctly probed.
But right after that umass0 gets detached.

I also tried snooping with usbdump and this is what I see:

17:05:16.390793 usbus1.2 SUBM-BULK-EP=00000001,SPD=HIGH,NFR=1,SLEN=32,IVAL=0 frame[0] WRITE 31 bytes 0000 55 53 42 43 08 00 00 00 00 02 00 00 80 00 0A 28 |USBC...........(| 0010 00 00 7A FF FE 00 00 01 00 00 00 00 00 00 00 -- |..z............ | 17:05:16.390982 usbus1.2 DONE-BULK-EP=00000001,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 31 bytes 17:05:16.391009 usbus1.2 SUBM-BULK-EP=00000082,SPD=HIGH,NFR=1,SLEN=0,IVAL=0 frame[0] READ 512 bytes 17:05:16.401376 usbus1.2 DONE-BULK-EP=00000082,SPD=HIGH,NFR=0,SLEN=0,IVAL=0,ERR=CANCELLED

This corresponds to host sending <<READ(10). CDB: 28 00 00 7a ff fe 00 00 01 00>> command that's reported in the log. Then there is ERR=CANCELLED when trying to get data from the command (READ 512 bytes).
Not sure if that error is a consequence or a cause of the disconnect.

Any help / hints / insights / stories are appreciated.
Thank you.

--
Andriy Gapon


Reply via email to