Re: USB device fails to attach
Nick Hudson <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
On 06/08/2025 03:11, Valery Ushakov wrote: > When I plug in the reader I get this in dmesg: > > input context: 96 bytes @ 0xffff8d84b8f03000 > 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 30 08 00 00 01 00 00 00 00 00 00 00 00 00 | ..0............. > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 26 00 40 00 01 00 78 1f 01 00 00 00 | ....&[email protected]..... > 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > output context: 64 bytes @ 0xffff8d84b8f02000 > 00 00 30 08 00 00 01 00 00 00 00 00 09 00 00 10 | ..0............. > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 01 00 00 00 26 00 40 00 01 00 78 1f 01 00 00 00 | ....&[email protected]..... > 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > slot context: 32 bytes @ 0xffff8d84b8f02000 > 00 00 30 08 00 00 01 00 00 00 00 00 09 00 00 10 | ..0............. > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > input context: 128 bytes @ 0xffff8d84b8f03000 > 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 30 08 00 00 01 00 00 00 00 00 00 00 00 00 | ..0............. > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 00 00 40 00 01 00 78 1f 01 00 00 00 | [email protected]..... > 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ > uhub1: port 1, set config at addr 9 failed > uhub1: autoconfiguration error: device problem, disabling port 1 > Maybe the answer is in the context's above - the answer is in the xhci spec which I've not read for a long time. > > and this in usbhist: [snip] > 1754445767.725282 usbd_probe_and_attach#2@1: called: trying device specific drivers > 1754445767.725386 usbd_probe_and_attach#2@1: no device specific driver found > 1754445767.725386 usbd_probe_and_attach#2@1: looping over 1 configurations > 1754445767.725386 usbd_probe_and_attach#2@1: trying config idx=0 Here's the usbd_set_config_index call > 1754445767.725386 usbd_set_config_index#2@1: called: dev=0xffffd509d48d4000 index=0 > 1754445767.725386 usbd_get_config_desc#2@1: called: confidx=0 > 1754445767.725387 usbd_get_desc#4@1: called: type=2, index=0, len=9 > 1754445767.725387 usbd_do_request_len#44@1: called: dev=0xffffd509d48d4000 req=ffff8d84b8e2acc0 flags=0 len=9 > 1754445767.725387 xhci_allocx#15@1: called! > 1754445767.725387 usbd_alloc_xfer#44@1: called: returns 0xffffd509d3c01750 > 1754445767.725387 usb_allocmem#41@1: called! > 1754445767.725388 usbd_transfer#44@1: called: xfer = 0xffffd509d3c01750, flags = 0x2, pipe = 0xffffd509d4d7f800, running = 0 > 1754445767.725388 xhci_device_ctrl_transfer#10@1: called! > 1754445767.725388 xhci_device_ctrl_start#10@1: called: req: 0680 0200 0000 0009 > 1754445767.725388 xhci_ring_put#13@1: called: 0xffffd509d9208dc0 xr_ep 0x1b xr_cs 1 > 1754445767.725389 usbd_xfer_schedule_timeout#29@1: called: xfer 0xffffd509d3c01750 timeout 5000ms set 0 reset 0 > 1754445767.725389 usbd_transfer#44@1: <- sleeping on xfer 0xffffd509d3c01750 Here it completes with USBD_TIMEOUT... > 1754445772.722633 usbd_xfer_timeout#2@1: called: xfer 0xffffd509d3c01750 status 1 > 1754445772.722634 usbd_xfer_probe_timeout#3@1: called: xfer 0xffffd509d3c01750 timeout 5000ms set 1 reset 0 > 1754445772.722646 usbd_xfer_probe_timeout#3@1: xfer 0xffffd509d3c01750 timing out > 1754445772.722647 usbd_xfer_timeout#2@1: xfer 0xffffd509d3c01750 schedule timeout task > 1754445772.722647 usb_add_task#2@1: called! > 1754445772.722649 usbd_xfer_timeout_task#2@0: called: xfer 0xffffd509d3c01750 status 1 > 1754445772.722649 usbd_xfer_probe_timeout#4@0: called: xfer 0xffffd509d3c01750 timeout 5000ms set 1 reset 0 > 1754445772.722650 usbd_xfer_probe_timeout#4@0: xfer 0xffffd509d3c01750 timing out > 1754445772.722650 usbd_xfer_timeout_task#2@0: xfer 0xffffd509d3c01750 timed out > 1754445772.722650 xhci_abortx#1@0: called: xfer 0xffffd509d3c01750 pipe 0xffffd509d4d7f800 > 1754445772.722650 xhci_pipe_restart#1@0: called: pipe 0xffffd509d4d7f800 slot 9 dci 1 > 1754445772.722651 xhci_reset_endpoint#1@0: called: slot 9 dci 1 > 1754445772.722651 xhci_do_command_locked#4@0: called: input: 0x0000000000000000 0x00000000 0x09013800 > 1754445772.722651 xhci_ring_put#14@0: called: 0xffffd509d35b0080 xr_ep 0x2a xr_cs 1 > 1754445772.722655 xhci_intr#15@0: called! > 1754445772.722655 xhci_intr1#15@0: called: USBSTS 0x00000008 > 1754445772.722658 usb_schedsoftintr#42@0: called: polling=0 > 1754445772.722659 xhci_softintr#15@0: called: er: xr_ep 84 xr_cs 0 > 1754445772.722659 xhci_handle_event#23@0: called: event: 0xffff8d84a8a0f540 0x000000011efc12a0 0x01000000 0x09008400 > 1754445772.722659 xhci_event_cmd#4@0: called! > 1754445772.722661 xhci_set_dequeue#1@0: called: slot 9 dci 1 > 1754445772.722661 xhci_do_command_locked#5@0: called: input: 0x000000011f780001 0x00000000 0x09014000 > 1754445772.722662 xhci_ring_put#15@0: called: 0xffffd509d35b0080 xr_ep 0x2b xr_cs 1 > 1754445772.722904 xhci_intr#16@0: called! > 1754445772.722905 xhci_intr1#16@0: called: USBSTS 0x00000008 > 1754445772.722908 usb_schedsoftintr#43@0: called: polling=0 > 1754445772.722908 xhci_softintr#16@0: called: er: xr_ep 85 xr_cs 0 > 1754445772.722909 xhci_handle_event#24@0: called: event: 0xffff8d84a8a0f550 0x000000011efc12b0 0x01000000 0x09008400 > 1754445772.722909 xhci_event_cmd#5@0: called! > 1754445772.722910 usb_transfer_complete#49@0: called: pipe = 0xffffd509d4d7f800 xfer = 0xffffd509d3c01750 status = 15 actlen = 0 > 1754445772.722910 usb_transfer_complete#49@0: xfer 0xffffd509d3c01750: repeat 0 new head = 0 > 1754445772.722910 usb_transfer_complete#49@0: xfer 0xffffd509d3c01750 doing done 0xffffffff806e1665 > 1754445772.722910 xhci_device_ctrl_done#10@0: called! > 1754445772.722911 usb_transfer_complete#49@0: xfer 0xffffd509d3c01750 doing callback 0 status 15 > 1754445772.722911 usb_transfer_complete#49@0: <- done xfer 0xffffd509d3c01750, wakeup Nick