summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't rely on USB interfaces being at compliant indices.edd2021-01-291-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When obtaining an interface handle, we currently rely on the device being properly USB compliant, and thus the interface being at the correct index in the interfaces array. However, some devices present their indices incorrectly. For example, the following audio device exposes interfaces 0, 1 and 3, in that order (skipping interface 2 entirely): uaudio2 at uhub4 port 4 configuration 1 interface 3 "E+ Corp. DAC Audio" rev 1.10/0.01 addr 2 uaudio2: class v1, full-speed, async, channels: 2 play, 0 rec, 3 ctls This means that that the audio stream interface (number 3) is not found at the expected index of 2, and this causes looking up the handle to fail. This change makes usbd_device2interface_handle() search for the right interface, instead of assuming it will be at the right index. Although this is a little slower, note that this routine not very frequently called and there are typically not hundreds of interfaces on a typical USB device. This fixes the above E+ Corp device, and one other uaudio device reported broken by a user. With input from, tested by, and OK ratchov@, mglocker@ and kettenis@. Many thanks!
* Be consistent in not using parameter names for function prototypes;mglocker2021-01-281-3/+3
| | | | I've missed two more cases in the previous commit.
* Rename bNumInterface to bNumInterfaces to fix build on arm64.kurt2021-01-281-2/+2
|
* The usb configuration descriptor parameter providing the number ofmglocker2021-01-276-16/+16
| | | | | | available device interfaces is called 'bNumInterfaces'. ok phessler@, thfr@ (who provided the man page diff)
* Be consistent in not using parameter names for function prototypes.mglocker2021-01-271-5/+5
|
* Resolve data toggle out of sync problem for ugen(4) and uhidev(4) devicesmglocker2021-01-252-2/+92
| | | | | | | | | | on xhci(4) controllers by clearing the interface endpoints before opening the pipes. Tested by Mikolaj Kucharski for ugen(4) and gnezdo@ for uhidev(4), plus myself for both. ok mpi@
* Add the new function usbd_clear_endpoint_feature() which allows to issuemglocker2021-01-252-2/+16
| | | | | | | an UR_CLEAR_FEATURE request on a specific endpoint address without the need to have a pipe open to that endpoint. From NetBSD, ok mpi@
* introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.thfr2021-01-234-4/+164
| | | | | | | | This includes ujoy_hid_is_collection() to work around limitations of hid_is_collection() until this can be combined without fallout. input, testing with 8bitdo controller, and ok brynet@ PS4 controller testing, fix for hid_is_collection, and ok mglocker@
* regenjsg2021-01-162-4/+9
|
* add Intel AX201 Bluetoothjsg2021-01-161-1/+2
|
* When an endpoint stalls, we usually try to reset it by callingmglocker2021-01-111-2/+2
| | | | | | | | | | | | usbd_clear_endpoint_stall(), which in turn will call usbd_clear_endpoint_toggle(). It can be a common situation that when this happens, there is still a transfer in the stalled queue being in progress. The ehci(4) clear toggle function is currently doing a panic() in the diagnostic code in this situation, which is a bit of an overkill. The device still can be recovered by detaching/attaching it. Therefore change the panic() in to a printf(). ok mpi@
* add quirks for Kensington Slimblade trackball via new vendor buttonsthfr2021-01-103-3/+10
| | | | | | | quirks. Original diff from Sven M. Hallberg < pesco () khjk ! org > Diff updated and tested by Timo Myyra ok phessler@
* regenthfr2021-01-102-4/+9
|
* add Kensington Slimblade Trackballthfr2021-01-101-1/+2
|
* Refactor klist insertion and removalvisa2020-12-252-6/+6
| | | | | | | | | | | | Rename klist_{insert,remove}() to klist_{insert,remove}_locked(). These functions assume that the caller has locked the klist. The current state of locking remains intact because the kernel lock is still used with all klists. Add new functions klist_insert() and klist_remove() that lock the klist internally. This allows some code simplification. OK mpi@
* Do proper accounting of zero length TDs. Currently a specific numbermglocker2020-12-242-2/+6
| | | | | | | | | | | | of zero length TDs can cause our free TRBs to run out, causing xhci(4) to return USBD_NOMEM to the USB stack. The issue was reported by Jonathon Fletcher <jonathon.fletcher () gmail ! com> -- Thanks! Reviewed/suggestions by patrick@. ok mpi@
* Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan2020-12-121-3/+3
| | | | | | OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
* Fix deferred key tasks along the same lines as urtwn(4) and run(4).krw2020-11-306-12/+57
| | | | | | | athn(4) tested by stsp@, who points out that otus(4) and rsu(4) don't yet invoke the code path to do their own key setting. ok stsp@
* Unleash curlen check from DIAGNOSTIC block, and change the related printf'smglocker2020-11-271-7/+7
| | | | | | to DPRINTF's. From Mikolaj Kucharski <mikolaj AT kucharski DOT name>
* As in urtwn(4), don't bring link up (getting dhclient(8) excited) untilkrw2020-11-272-8/+22
| | | | | | all the keys are negotiated and installed. ok stsp@
* Adopt a Linux heuristic and mark as IGNORE_RESIDUE those umass(4)krw2020-11-232-2/+12
| | | | | | | | | | devices whose INQUIRY command succeeds but with a residue equal to the requested bytes. Subsequent i/o's (including the INQUIRY) which succeed with a residue equal to the requested bytes will have residue set to 0. Fixes (very?) old devices such as the memory stick Andrew Daugherity pulled out of his drawer and with which he hoped to install 6.8. Subsequent testing of diffs much appreciated!
* Zap parameter names in function prototypes.mglocker2020-11-171-4/+4
|
* regenpatrick2020-11-162-9/+9
|
* Move PL2303GC around to make sure the list is sorted properly.patrick2020-11-161-2/+2
|
* match on Edimax EW-7811Un V2, from Morgan Aldridgejmatthew2020-11-151-1/+2
|
* regenjmatthew2020-11-152-4/+9
|
* add Edimax EW-7811Un V2, from Morgan Aldridgejmatthew2020-11-141-1/+2
|
* Add support for the PL2303HXN series chips to uplcom(4). The mainpatrick2020-11-131-18/+62
| | | | | | | | | | difference is that is uses a different bRequest value for READ/WRITE. Apart from that the flow control bits are in a different register and resetting the data pipes uses different bits as well. We can check if its an HXN by reading an HX-only register and checking for a fail. ok kettenis@
* Don't enable port or link until all crypto keys are installed bykrw2020-11-121-3/+19
| | | | | | | | async task(s). Makes dhclient(8) much happier. Suggestions and ok stsp@, jmatthew@
* syncpatrick2020-11-112-4/+9
|
* Add Prolific PL2303GC USB serial adapter.patrick2020-11-111-1/+2
|
* Fix urtwn(4) against access points which use WPA1/TKIP as the group cipher.stsp2020-11-101-2/+5
| | | | | | | | | | Problem first reported against dhclient(8) by Artem Mazurov on bugs@ Bug was traced down into urtwn(4) by krw@ with a TP-Link TP-WA850RE AP. Regardless, please configure your access points to use WPA2/AES only! WPA1/TKIP is insecure and should die. ok krw@
* synctobhe2020-11-021-2/+4
|
* Enable brightness keys on powerbooks where the keyboard attaches as ukbd(4).tobhe2020-11-022-3/+7
| | | | ok kn@
* Apple Geyser3 keyboards need munging as well. Reported by Mathius Schocker.kettenis2020-10-281-1/+2
| | | | ok tohe@, deraadt@
* regenkettenis2020-10-282-4/+39
|
* Add a few more Apple Geyser IDs.kettenis2020-10-281-1/+8
| | | | ok tobhe@, deraadt@
* syncphessler2020-10-252-4/+9
|
* add my new graphics tablet, not yet workingphessler2020-10-251-1/+2
|
* Subtract threshold from absolute position to allow absolute pointertobhe2020-10-231-3/+3
| | | | | | | movement smaller than threshold. Fixes an issue where the pointer sometimes jumped a few pixels. ok bluhm@
* Don't panic on curlen == 0. This DIAGNOSTIC code should have been removedmglocker2020-10-231-5/+1
| | | | | | already in revision 1.57 IMO. From Mikolaj Kucharski <mikolaj AT kucharski DOT name>
* regenmglocker2020-10-172-4/+9
|
* Add Logitech Webcam Pro 9000.mglocker2020-10-171-1/+2
| | | | From Raf Czlonka <rczlonka at gmail dot com>
* regenjsg2020-10-142-21/+16
|
* don't match on 17ef:3083 in ure(4)jsg2020-10-142-12/+10
| | | | | | | | | | Stefan Hagen reports this is an audio device found on the Lenovo ThinkPad Thunderbolt 3 Workstation Dock Gen 2. Originally added as the id appeared in rtux64w10.INF from thinkpad_usb-c_dock_gen2_drivers_v1.0.3.03241.exe as %Lenovo-FFF.DeviceDesc% = RTL8153Bx64_S5WOL.ndi,USB\VID_17EF&PID_3083&REV_3101 but this appears to be wrong.
* Stop exporting `wt_hwqueue' now that drivers don't advertise it.mpi2020-10-112-4/+2
| | | | Pointed by and ok jsg@
* Kill unused IEEE80211_RADIOTAP_HWQUEUE.mpi2020-10-091-3/+2
| | | | | | | | | | Its value is conflicting with an effort to standardize TX flags fields of the radiotap header from Mathy Vanhoef. This flag used to indicate the presence of a specific hardware queue used by WME but is unchecked. ok sthen@, kn@
* add more ure(4) idsjsg2020-10-051-3/+56
| | | | | found in lenovo version of realtek windows driver and linux ok kevlo@
* regenjsg2020-10-052-4/+344
|
* add more ure(4) idsjsg2020-10-051-1/+85
| | | | | found in lenovo version of realtek windows driver and linux ok kevlo@