usb/179342: Freebsd 10.0-current USB 3.0 not working (xhci_do_comand: Command timeout!)
Mike C.
miguelmclara at gmail.com
Sat Jul 6 22:10:01 UTC 2013
The following reply was made to PR usb/179342; it has been noted by GNATS.
From: "Mike C." <miguelmclara at gmail.com>
To: bug-followup at FreeBSD.org
Cc: Hans Petter Selasky <hps at bitfrost.no>
Subject: Re: usb/179342: Freebsd 10.0-current USB 3.0 not working (xhci_do_comand:
Command timeout!)
Date: Sat, 06 Jul 2013 23:07:18 +0000
This is a multi-part message in MIME format.
--------------020508010507010404080808
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
I adapted the previous patch to work with the recent changes and it work
for me...
So I've updated to the latest revision (revision 252698) and aplied the
patch, has expect it works and I can use my USB 3.0 ports!
--------------020508010507010404080808
Content-Type: text/plain; charset=us-ascii;
name="xhci_timer.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="xhci_timer.diff"
=== xhci.h
==================================================================
--- xhci.h (revision 252698)
+++ xhci.h (local)
@@ -438,6 +438,8 @@
/* configure message */
struct usb_bus_msg sc_config_msg[2];
+ struct usb_callout sc_callout;
+
union xhci_hub_desc sc_hub_desc;
struct cv sc_cmd_cv;
=== xhci_pci.c
==================================================================
--- xhci_pci.c (revision 252698)
+++ xhci_pci.c (local)
@@ -142,6 +142,16 @@
usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc);
}
+static void
+xhci_timer(void *_sc)
+{
+ struct xhci_softc *sc = _sc;
+ USB_BUS_UNLOCK(&sc->sc_bus);
+ xhci_interrupt(sc);
+ USB_BUS_LOCK(&sc->sc_bus);
+ usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_timer, sc);
+}
+
static int
xhci_pci_attach(device_t self)
{
@@ -186,6 +196,12 @@
sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self));
+ usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0);
+
+ USB_BUS_LOCK(&sc->sc_bus);
+ xhci_timer(sc);
+ USB_BUS_UNLOCK(&sc->sc_bus);
+
if (sc->sc_irq_res != NULL) {
err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl);
--------------020508010507010404080808--
More information about the freebsd-usb
mailing list