Date: Fri, 7 Jun 2013 06:30:05 GMT From: Hans Petter Selasky <hps@bitfrost.no> To: freebsd-usb@FreeBSD.org Subject: Re: usb/179342: Freebsd 10.0-current USB 3.0 not working (xhci_do_comand: Command timeout!) Message-ID: <201306070630.r576U53h044057@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR usb/179342; it has been noted by GNATS. From: Hans Petter Selasky <hps@bitfrost.no> To: "Miguel C." <miguelmclara@gmail.com> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: usb/179342: Freebsd 10.0-current USB 3.0 not working (xhci_do_comand: Command timeout!) Date: Fri, 07 Jun 2013 08:06:14 +0200 This is a multi-part message in MIME format. --------------090608050403080409000203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/05/13 21:05, Miguel C. wrote: > >> Number: 179342 >> Category: usb >> Synopsis: Freebsd 10.0-current USB 3.0 not working (xhci_do_comand: Command timeout!) >> Confidential: no >> Severity: non-critical >> Priority: low >> Responsible: freebsd-usb >> State: open >> Quarter: >> Keywords: >> Date-Required: >> Class: sw-bug >> Submitter-Id: current-users >> Arrival-Date: Wed Jun 05 19:10:00 UTC 2013 >> Closed-Date: >> Last-Modified: >> Originator: Miguel C. >> Release: >> Organization: >> Environment: > % uname -a > FreeBSD r2d2 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Mon May 13 00:54:58 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >> Description: > This is an Ultrabook (acer s3) with only one USB 3.0 Controller (2-ports) > > I first noticed that I could not install 10-current using the memstick images, I got stuck at mount root, after upgrading form 9.1 using base and kernel tarballs I noticed that the system has no longer detecting my memsticks. > > > When connecting usb devices (memstick,hdd) I get: > > xhci_do_comand: Command timeout! > usb_alloc_device: device init 2 failed (USB_ERR_TIMEOUT, ignored) > usbgen0.2: <Unknown> at usbus0 (disconnected) > usb_reattach_port: could not allocate new device > > > More info about the controller: > xhci0: <Intel Panther Point USB 3.0 controller> mem 0xc0500000-0xc050ffff at device 20.0 on pci0 > > And has I explained in the mailling list, I already tried: > > sysctl hw.xhci.xhci_port_route=-1 (and =1) in /boot/loader.conf > (and in sysctl.conf but I guess the first one is the proper way > > rebooted, and still no luck. > > >> How-To-Repeat: > 1: Download a memstick image and dd to a usb, after boot you get stuck at "mountroot" prompt. > > 2: If you're able to install 10-0 current any other way, just connect a USB memstick to 3.0 controller, and you'll see the problem (unless if this is related to my controller specifically - Intel Panther Point USB 3.0) >> Fix: > Tried: sysctl hw.xhci.xhci_port_route=-1 -> DID NOT work! > Hi, Can you patch the kernel using the attached patch? It will fake interrupts. Does the XHCI work now? --HPS --------------090608050403080409000203 Content-Type: text/x-patch; name="xhci_timer.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xhci_timer.diff" === xhci.h ================================================================== --- xhci.h (revision 251258) +++ 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 251258) +++ xhci_pci.c (local) @@ -132,6 +132,16 @@ } } +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) { @@ -175,6 +185,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 (__FreeBSD_version >= 700031) 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); --------------090608050403080409000203--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306070630.r576U53h044057>