I recently enabled the "USB 3.0" option in the BIOS of my notebook.
This transforms two of my USB 2.0 ports into USB 3.0 ports -- I'm
already a little leery of it in that regard.  When I boot, I see
xhci(4) attach.  However, when I plug in a device (such as my HTC
phone), I see the following:

xhci_do_command: Command timeout!
usb_alloc_device: set address 2 failed (USB_ERR_TIMEOUT, ignored)
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
usbd_setup_device_desc: getting device descriptor at addr 2 failed,
USB_ERR_TIMEOUT
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_TIMEOUT, ignored)
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
usbd_setup_device_desc: getting device descriptor at addr 2 failed,
USB_ERR_TIMEOUT
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_TIMEOUT, ignored)
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
xhci_do_command: Command timeout!
usbd_setup_device_desc: getting device descriptor at addr 2 failed,
USB_ERR_TIMEOUT
ugen1.2: <Unknown> at usbus1 (disconnected)
xhci_do_command: Command timeout!
uhub_reattach_port: could not allocate new device
xhci_do_command: Command timeout!
usb_alloc_device: device init 2 failed (USB_ERR_TIMEOUT, ignored)
ugen1.2: <Unknown> at usbus1 (disconnected)
uhub_reattach_port: could not allocate new device

My kernel version:

FreeBSD m6500.local 9.0-RC3 FreeBSD 9.0-RC3 #1 r228305M: Thu Dec 15
21:38:20 CST 2011     root@m6500.local:/usr/obj/usr/src/sys/DELL_M6500
 amd64

I'm looking for some hints on where to start looking/hacking, or what
further information may be useful (and where to get it).  Again, I
have to assume that since XHCI is an option in the BIOS, this must be
some quirky piece of hardware I'm working with.  Oh, and, I guess I
need to know what I'm looking for when I try to identify the actual
hardware (usbconfig?).

Also, I tried and failed at this again with the following changes
(gleaned from HEAD):

Index: xhci.c
===================================================================
--- xhci.c      (revision 228305)
+++ xhci.c      (working copy)
@@ -292,7 +292,7 @@
        XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST);

        for (i = 0; i != 100; i++) {
-               usb_pause_mtx(NULL, hz / 1000);
+               usb_pause_mtx(NULL, hz / 100);
                temp = XREAD4(sc, oper, XHCI_USBCMD) &
                    (XHCI_CMD_HCRST | XHCI_STS_CNR);
                if (!temp)
@@ -453,7 +453,7 @@
            XHCI_CMD_INTE | XHCI_CMD_HSEE);

        for (i = 0; i != 100; i++) {
-               usb_pause_mtx(NULL, hz / 1000);
+               usb_pause_mtx(NULL, hz / 100);
                temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH;
                if (!temp)
                        break;
@@ -487,7 +487,7 @@
        XWRITE4(sc, oper, XHCI_USBCMD, 0);

        for (i = 0; i != 100; i++) {
-               usb_pause_mtx(NULL, hz / 1000);
+               usb_pause_mtx(NULL, hz / 100);
                temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH;
                if (temp)
                        break;
@@ -1127,7 +1127,7 @@
        trb.dwTrb2 = 0;
        trb.dwTrb3 = htole32(XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ENABLE_SLOT));

-       err = xhci_do_command(sc, &trb, 50 /* ms */);
+       err = xhci_do_command(sc, &trb, 100 /* ms */);
        if (err)
                goto done;

@@ -1154,7 +1154,7 @@

        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1310,7 +1310,7 @@

        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1328,7 +1328,7 @@
            XHCI_TRB_3_SLOT_SET(slot_id);
        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1351,7 +1351,7 @@

        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1373,7 +1373,7 @@
            XHCI_TRB_3_EP_SET(ep_id);
        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1396,7 +1396,7 @@

        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 static usb_error_t
@@ -1414,7 +1414,7 @@

        trb.dwTrb3 = htole32(temp);

-       return (xhci_do_command(sc, &trb, 50 /* ms */));
+       return (xhci_do_command(sc, &trb, 100 /* ms */));
 }

 /*------------------------------------------------------------------------*

There seem to be other changes made as well, which I haven't had the
time to try.  Some of these changes are stated to be MFC'd -- will
they make it into 9.0-RELEASE (or a Release Candidate for testing)?

A few examples:

http://svnweb.freebsd.org/base?view=revision&revision=227396
http://svnweb.freebsd.org/base?view=revision&revision=227401
http://svnweb.freebsd.org/base?view=revision&revision=227404

...or a really good one:

http://svnweb.freebsd.org/base?view=revision&revision=228483

-Brandon
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to