# USB Errors on 13.1



## Barney (Dec 15, 2022)

Trying to run 13.1 on an X10Sri-F MB and getting these continuous errors:


```
Dec 14 20:30:55 dev131 kernel: usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOU
Dec 14 20:30:55 dev131 kernel: usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored
Dec 14 20:31:05 dev131 kernel: usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_TIMEOUT
Dec 14 20:31:06 dev131 kernel: usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored)
```

I have 4 different keyboards and none of them work at all. I have a freebsd 13.0 install disk on a USB which fully boots ok and then starts throwing these same errors, so it's not my build. Normally I'd say that the MB might have a problem, but freebsd 9.3 runs without any errors.

I have everything compiled into the kernel so there are no modules. I turned on hw.usb.debug and got this:


```
Dec 14 21:01:28 dev131 kernel: usb_set_device_state: udev 0xfffff80015377000 state POWERED -> POWERED
Dec 14 21:01:28 dev131 kernel: usbd_req_re_enumerate: addr=4, set address failed! (USB_ERR_IOERROR, ignored)
Dec 14 21:01:28 dev131 kernel: usbd_setup_device_desc: Minimum bMaxPacketSize is large enough to hold the complete device descriptor or only one bMaxPacketSize choice
Dec 14 21:01:28 dev131 kernel: usbd_do_request_callback: st=0
Dec 14 21:01:28 dev131 kernel: usbd_transfer_submit: xfer=0xfffff80142ead148, endpoint=0xfffff80015377128, nframes=2, dir=read
Dec 14 21:01:28 dev131 kernel: usb_dump_endpoint: endpoint=0xfffff80015377128 edesc=0xfffff80015377770 isoc_next=0 toggle_next=0 bEndpointAddress=0x00
Dec 14 21:01:28 dev131 kernel: usb_dump_queue: endpoint=0xfffff80015377128 xfer:
Dec 14 21:01:28 dev131 kernel: usbd_transfer_submit: open
Dec 14 21:01:28 dev131 kernel: usbd_pipe_enter: enter
Dec 14 21:01:28 dev131 kernel: usbd_pipe_start: start
Dec 14 21:01:29 dev131 kernel: usbd_transfer_done: err=USB_ERR_TIMEOUT
Dec 14 21:01:29 dev131 kernel: usbd_transfer_done: err=USB_ERR_NORMAL_COMPLETION
Dec 14 21:01:29 dev131 kernel: usbd_callback_wrapper_sub: xfer=0xfffff80142ead148 endpoint=0xfffff80015377128 sts=20 alen=0, slen=26, afrm=0, nfrm=2
Dec 14 21:01:29 dev131 kernel: usbd_do_request_callback: st=2
Dec 14 21:01:29 dev131 kernel: usbd_transfer_stop: close
Dec 14 21:01:29 dev131 kernel: usbd_transfer_done: err=USB_ERR_CANCELLED
Dec 14 21:01:29 dev131 kernel: usbd_transfer_done: not transferring
Dec 14 21:01:29 dev131 kernel: usbd_do_request_flags: error=USB_ERR_TIMEOUT - waiting a bit for TT cleanup
Dec 14 21:01:29 dev131 kernel: usbd_do_request_callback: st=0
Dec 14 21:01:29 dev131 kernel: usbd_transfer_submit: xfer=0xfffff80142ead148, endpoint=0xfffff80015377128, nframes=2, dir=read
Dec 14 21:01:29 dev131 kernel: usb_dump_endpoint: endpoint=0xfffff80015377128 edesc=0xfffff80015377770 isoc_next=0 toggle_next=0 bEndpointAddress=0x00
Dec 14 21:01:29 dev131 kernel: usb_dump_queue: endpoint=0xfffff80015377128 xfer:
```

So it appears this was broken in 10.x. 9.3 runs just fine and 10.4 and after gets these errors. Anyone have any ideas as to what changes were made in 10? This reminds me of the problems in early 9.x
that were fixed in 9.2 or 9.3. I remember porting back code from 9.3 to 9.1 a million or so years ago.


----------



## cracauer@ (Dec 15, 2022)

Difficult since it is reporting a timeout.

Did you try a random hub between keyboard and mainboard?


----------



## Barney (Dec 15, 2022)

I get the error with no keyboard; the kbd is never recognized. The error is persistent after boot regardless


----------



## elgrande (Dec 15, 2022)

Have you tried it with stock GENERIC 13.1?


----------



## Barney (Dec 15, 2022)

Yes. I assume the 13.1 install disk is running GENERIC?

So I found the problem; there was a misaligned USB. header on the MB. Something of concern is that such a thing can make a system unusable; apparently in 9.3 the port was marked bad and it went on with it's business. In 10x and beyond it makes the system unstable or unusable.  For example, the bad header was at addr 4; while the system was failing on addr 2 (where the kbd was plugged in). So is seemed to bugger the entire usb system.


----------

