summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/xhci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of matching root hubs with a custom address, that only worksmpi2014-03-251-2/+1
| | | | | | | because USB_START_ADDR is defined to 0 and the softc is M_ZERO'd, assume that root hubs are the only devices with a depth of 0. Root hubs can now happily be detached and reattached.
* Upon resume do a full reset of the HC, including the command and eventmpi2014-03-251-18/+29
| | | | | | | rings, and rewrite all the addresses in the registers. While here don't keep a copy of our usb(4) child device, autoconf(9) knows how to reach our children.
* Properly clear and free the endpoint associated to a pipe. Do notmpi2014-03-181-27/+40
| | | | | | | | | forget to update the Endpoint Context with the last valid endpoint and free the device resources, including its slot, when the default pipe is closed. Device addresses can now be reused and I should be done with descriptor leaks.
* If a device is babbling do a full reset of the associated endpointmpi2014-03-121-46/+102
| | | | | | | | | | | | | before telling the stack/driver that the responsible transfer is done. Since the request sequence requires, in the present form, to submit two commands from the interrupt handler, modify the command routine to be able to submit asynchronous commands. I can now use my crappy urtwn(4) over xhci(4). While here convert some #if -> #ifdef, pointed out by brad@.
* Dumb xhci(4) implementation.mpi2014-03-081-0/+2199
This driver does not handle isochronous endpoint (yet) and has no logical TD representation. Each transfer is linked to the raw TRB of its related endpoint. Most of the transfer error completion codes are not handled, even with all the cheese provided by miod@ I couldn't find a proper way to reset an endpoint asynchronously when a device babbles. Or maybe it was the wine? Anyway this will come soon. In general the endpoint configuration and reset code is really crude and requires some love, but our stack should be fixed to properly open only once the default pipe of every new USB device first. This means this driver wont work as it is, our stack needs other changes first. Suspend/resume works but ports are not suspended for the moment. But even with these problems, interrupt devices: ukbd(4), ums(4) and sensors like ugold(4) work properly and USB 3.0 umass(4) devices give me a reasonnable read/write speed. Timeouts to cancel USB transfers are not enabled *on purpose*, to be able to track down potential timing issues. I'm committing now so that others can help fixing my bugs (8 All this work has been done on an ExpressCard with a NEC xHCI 0.96, other implementations/versions might trigger more bugs :)