On Wed, 5 Aug 2020 15:35:41 +0100
Jason McIntyre <[email protected]> wrote:
> hi.
>
> i have a usb hardware dac which shows up as uaudio. i've discovered
> that it works when plugged into a usb2 port, but not usb3. i've
> verified it fails to work on two different machines with usb3 ports.
> all machines are running current amd64.
>
> the soundcard is recognised, but i get this on a usb2 port (which
> works):
>
> uhidev0: iclass 3/0
> uhid0 at uhidev0: input=64, output=64, feature=0
>
> and this on a usb3 port:
>
> uhidev0: no report descriptor
>
> i've inlined below dmesg and "lsusb -vvv" for the working machine and
> one of the ones that doesn;t work (with the device plugged in).
>
> ratchov examined the audio device (from afar) and concluded nothing
> looked amiss with it. mpi suggested it may be "a timing issue related
> to the sequence to probe new devices".
>
> jmc
Somehow your output of lsusb -vvv doesn't seem to contain the full
output of the uaudio device. I don't know whether it has been cut-off
during copy/paste or if lsusb had problems to parse the uaudio device.
Anyway, I'm just making a very wild guess out in the blue, untested;
Can you give this diff a spin on the USB3 machine?
Index: sys/dev/usb/xhci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/xhci.c,v
retrieving revision 1.119
diff -u -p -u -p -r1.119 xhci.c
--- sys/dev/usb/xhci.c 31 Jul 2020 19:27:57 -0000 1.119
+++ sys/dev/usb/xhci.c 6 Aug 2020 07:16:31 -0000
@@ -2196,6 +2196,18 @@ usb_device_descriptor_t xhci_devd = {
1 /* # of configurations */
};
+usb_device_qualifier_t xhci_odevd = {
+ USB_DEVICE_DESCRIPTOR_SIZE,
+ UDESC_DEVICE_QUALIFIER, /* type */
+ {0x00, 0x02}, /* USB version */
+ UDCLASS_HUB, /* class */
+ UDSUBCLASS_HUB, /* subclass */
+ UDPROTO_FSHUB, /* protocol */
+ 64, /* max packet */
+ 1, /* # of configurations */
+ 0
+};
+
const usb_config_descriptor_t xhci_confd = {
USB_CONFIG_DESCRIPTOR_SIZE,
UDESC_CONFIG,
@@ -2417,6 +2429,14 @@ xhci_root_ctrl_start(struct usbd_xfer *x
totlen = l = min(len, USB_DEVICE_DESCRIPTOR_SIZE);
USETW(xhci_devd.idVendor, sc->sc_id_vendor);
memcpy(buf, &xhci_devd, l);
+ break;
+ case UDESC_DEVICE_QUALIFIER:
+ if ((value & 0xff) != 0) {
+ err = USBD_IOERROR;
+ goto ret;
+ }
+ totlen = l = min(len, USB_DEVICE_DESCRIPTOR_SIZE);
+ memcpy(buf, &xhci_odevd, l);
break;
/*
* We can't really operate at another speed, but the spec says