summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2014-06-13Make run(4) attach to RT5572.Stefan Sperling
Tested with "MAC/BBP RT5592 (rev 0x0222), RF RT5592 (MIMO 2T2R)" device.
2014-06-13regenStefan Sperling
2014-06-13Add USB device ID of Ralink RT5572. Found in a TP-LINK TL-WDN3200 device.Stefan Sperling
2014-06-07In run(4), fix TXWI and RXWI offset calculations for RT5592 devices.Stefan Sperling
Makes RT5592 devices work, except for an 11a scanning issue, according to Brendan MacDonell who submitted this patch on tech@. Thanks! ok claudio@
2014-06-04Clearing the data toggle bit only makes sense for endpoints that use it,Martin Pieuchot
since this function is optional get rid of the no-op ones. ok ratchov@
2014-06-04Use C99 initializers for pipe and bus methods.Martin Pieuchot
Apart from improving readability, this will help us reduce the number of no-op functions now that some of them are optional. ok ratchov@
2014-06-04Properly compare endpoint addresses: ignore the direction bit whichAlexandre Ratchov
is not part of the address. From Remco <remco at d-compu.dyndns.org>, thanks! ok mpi@
2014-06-03Make zyd(4) compile with ZYD_DEBUG.Stefan Sperling
ok krw@ kettenis@ mpi@
2014-06-03Fix an off-by-one in zyd_rxeof().Stefan Sperling
ok krw@ kettenis@ mpi@
2014-06-03Fix zyd(4)'s frame length adjustment in RX path. Instead of snipping offStefan Sperling
HW-specific data and CRC trailer as intended, the driver was telling the net80211 layer frames were longer than they actually are. Math is hard. ok krw@ kettenis@ mpi@
2014-05-30Remove unused fields from the pipes.Martin Pieuchot
2014-05-28Apart from the early exploration done to find a console keyboard duringMartin Pieuchot
the boot process, USB devices must be attached or detached from the usb task thread in order to avoid races with periodical explorations issued by uhub(4) interrupts. Respect this rule when detaching root hubs during a suspend/resume cycle and avoid some hangs due to the aforementioned race. Tested by Mattieu Baptiste, thanks!
2014-05-26Matching USB devices per device IDs is not a good idea, especially ifMartin Pieuchot
the device has multiple interfaces and/or report IDs. Make sure utpms(4) only matches the mouse interface of the HID device embedded in Powerbooks and do not rely on the alphabetical order to have a working ukbd(4) on such machines. Problem reported by daniel@
2014-05-25The default case in uhci_deactivate() was missing. Because of that,Martin Pieuchot
DVACT_QUIESCE was not passed to usb(4) and a new uhub(4) device was reattached at every resume. Problem reported by mlarkin@
2014-05-24Support for newer run(4) hardware ported from FreeBSD's run(4) driver.Stefan Sperling
Committing over MAC/BBP RT5390 (rev 0x0502), RF RT5370 (MIMO 1T1R). Tested by myself, matthieu@, juanfra@ Diff glanced over by kettenis@
2014-05-24regenStefan Sperling
2014-05-24Add device IDs for newer run(4) devices. Obtained from FreeBSD.Stefan Sperling
2014-05-21regenMartin Pieuchot
2014-05-21Add VIA Labs.Martin Pieuchot
2014-05-21Handle the stall condition just like the bable one since in both casesMartin Pieuchot
the ring is halted. Do not bother reporting USBD_STALLED to the stack like other HC drivers do since the endpoint is automatically reseted. What is the point of this error apart from making sure driver authors will forget to call usbd_clear_endpoint_stall_async() correctly? The Renesas uPD720202 xHCI, provided by Stefan Wollny, now works as expected.
2014-05-20Format string fixes for XHCI_DEBUG.Martin Pieuchot
2014-05-19unbreak the build when DIAGNOSTIC is not definedJonathan Gray
allows ramdisk kernels to build again
2014-05-18hid_start_parse can't fail - it calls malloc(M_WAITOK). ok mpi@Jeremie Courreges-Anglas
2014-05-18Do not pass an xfer pointer to the timeout routine checking for root hubMartin Pieuchot
status changes because it might be freed when detaching the root uhub(4). Also do not reschedule a timeout if the pipe is being aborted. Finally do not add more code to retrieve the 'bInterval' value of the root hub endpoint descriptor since this value is hardcoded in the uhci(4) driver.
2014-05-17fix format mistakes visible if UAUDIO_DEBUG is definedAlexandre Ratchov
2014-05-16Reduce the difference between HC drivers by always passing a genericMartin Pieuchot
usbd_xfer pointer to the routines processing finished transfers to make it crystal clear that the timeout and abort logic is the same everywhere.
2014-05-16There is no need to remember which usb(4) device is the child of an USBMartin Pieuchot
host controller because autoconf(9) already does it.
2014-05-16It seems that there is new and old revision of CH340.sasano
Previous uchcom(4) driver targeted old one, and new one could not work because of uchcom_set_line_control() broke the value of UCHCOM_REG_LCR1(0x18). To support new CH340, uchcom_set_line_control() and uchcom_reset_chip() have been overhauled. Current uchcom(4) does not change the value of UCHCOM_REG_LCR1 register, it means even/odd parity mode is no longer supported with old CH340. ok by mpi@
2014-05-16regenDavid Coppa
2014-05-16Add Alcatel OneTouch L100VDavid Coppa
Diff from Lukasz Ratajski ok sthen@
2014-05-12Backport FreeBSD's HID parser in order to properly parse `moderm'Martin Pieuchot
input device descriptors, notably if they include an Item with an Usage array (Min-Max range) and others single Usage elements. Tested by many, thanks! ok andre@
2014-05-11The relation between uhci(4), ohci(4) and their root hub device isMartin Pieuchot
delicate. HC drivers do not always accept to be left alone. I don't know if it is a love crisis, but apparently receiving a root hub status change interrupt before having an uhub(4) attached breaks resume. So make sure the root hub is re-attached before interrupt get enabled. It is safe to do it during DVACT_RESUME since attaching root hubs do not require any USB transfer. Based on a diff from yasuoka@, fix a regression introduced in last commit an reported by Abel Abraham Camarillo Ojeda on tech@ and Nils R on bugs@.
2014-05-09Format string fixes and removal of -Wno-format for *ppc kernels.Miod Vallat
2014-05-09Plug an xfer leak when detaching root hubs.Martin Pieuchot
This leak is similar to the public xfer leak #1 that was affecting device interrupt pipes except that root hubs are rarely detached. Note that this xfer is never associated to any TD and is just used to indicate that some of the HC ports has changed status, so there is no need to flag it as "done" before completing it.
2014-05-08Plug one more xfer leak.Martin Pieuchot
Now that aborting interrupt pipes does not prevent us from freeing the associated xfer, make sure to flag this xfer as "done" even if there's no need to abort it in hardware.
2014-05-07Make sure to call uhidev_close() upon detach for every HID driver callingMartin Pieuchot
uhidev_open() at attach time. This plugs up to 3 xfer leaks and a buffer one. ok yuo@
2014-05-06Plug two xfer leaks and a buffer one.Martin Pieuchot
2014-05-05Plug a memory leak related to HID descriptor parsing.Martin Pieuchot
ok jsg@
2014-05-04Make use of usbd_xfer_isread() instead of rerolling it everywhere.Martin Pieuchot
This has the side effect of simplifying and reducing the differences between the various *hci_alloc_*_chain() functions since they are the principal place where we want to known if the transfer is a read or a write.
2014-05-04Get rid of EHCI_NULL. No functional change.Martin Pieuchot
2014-05-01fixed some debug messagessasano
ok by dcoppa@
2014-04-29Get rid of the per-softc freelist of transfer descriptors and use aMartin Pieuchot
per-driver pool(9) instead.
2014-04-29Finally plug the public xfer leak #1 in our USB stack.Martin Pieuchot
Every call to usbd_abort_pipe() on an interrupt pipe would simply reset the intrxfer pointer, which would prevent usbd_close_pipe() to free it. Since we abort pipes in a lot of situations: when a device is detached, when a USB-to-serial adapter is closed, when an error occurs, when the machine is suspended, etc, this would result in hundreds of leaked xfers in most of my machines. xhci(4) is not affected, but you can't enable it right now since the stack is not ready :) While here put a KASSERT() to make sure drivers are only calling the interrupt abort method for intrxfer, if that's not the case, please let met know.
2014-04-29regenRyan Thomas McBride
2014-04-29Add Microsoft Wireless Mobile Mouse 3500 and Wireless Arc Mouse.Ryan Thomas McBride
ok mpi
2014-04-29Make sure to call uhidev_close() upon detach, plug another xfer leak.Martin Pieuchot
2014-04-29Plug an xfer leak.Martin Pieuchot
2014-04-29Get rid of the per-softc freelist of transfer descriptors and use aMartin Pieuchot
per-driver pool(9) instead. With inputs from mikeb@
2014-04-29Remove device white-listing as matching method, relies on on usage idAndre de Oliveira
versus supported sensors table filtering. discussed with and ok mpi@
2014-04-27Start de-obfuscating the HC drivers.Martin Pieuchot
Since pipe methods have an xfer argument, always use it to get acces to various data structure (pipe, bus, device) instead of having a different way to get a pointer to these descriptors in every function. Also kill the {E,U}XFER() macro and use a consistent name accross all the methods for {e,u}hci_xfer.