summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Poll battery sensors less frequently. The previous period was quiteanton2021-02-161-2/+2
| | | | arbitrary and inspired by other USB drivers.
* Trim uhidpp_device_features() by extracting two pure protocol functions.anton2021-02-161-18/+52
|
* Back-out USB data toggle fix for HID devices, since we received multiplemglocker2021-02-151-43/+1
| | | | | | reports about broken devices, e.g. for ukbd(4) and fido(4). ok mpi@
* Postpone installation of the periodic sensor task until at least oneanton2021-02-141-2/+4
| | | | device has connected.
* Bail out earlier during attach if no devices are paired with theanton2021-02-141-4/+7
| | | | receiver.
* Enumerate all features supported by a device on connect.anton2021-02-141-6/+93
| | | | Should help diagnose various reports regarding missing battery sensors.
* Initialize the stack local device id variable correctly.anton2021-02-111-2/+2
| | | | CID 1501705
* Make room for handling of HID++ 1.0 devices. No functional change.anton2021-02-111-56/+69
|
* Use idx suffix consistently.anton2021-02-111-17/+17
|
* Remove unused software id macro.anton2021-02-111-2/+1
|
* Fold long line.anton2021-02-111-2/+3
|
* Stop uhidpp from claiming all report ids, instead only claim theanton2021-02-111-5/+22
| | | | | | | | | | | necessary ones. Solves a regression introduced with the arrival of uhidpp causing some Logitech HID devices from attaching to its appropriate driver. Thanks to <naszy at poczta dot fm> and Peter Kane <pwkane at gmail dot com> for reporting and trying out diffs. ok mglocker@
* Add uhidev_unset_report_dev(), doing the opposite ofanton2021-02-112-2/+13
| | | | | | uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp. ok mglocker@
* If uhidev_set_report_dev() already have been invoked for the givenanton2021-02-111-4/+6
| | | | | | report id, there's no point in trying to find a matching sub device. ok mglocker@
* Prevent that when ugen(4) tries to set an alternative configurationmglocker2021-02-051-1/+5
| | | | | | | | | | descriptor (usually doesn't happen), that we continue to use an outdated cdesc pointer which still refers to the previous cdesc. Instead update the cdesc pointer to the new configuration descriptor. Reported by Thomas Jeunet <cleptho AT gmail DOT com> ok phessler@
* Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton2021-02-042-1/+1060
| | | | | | | | | exposing battery sensors for HID++ 2.0 devices. Most of the code is derived from the hid-logitech-hidpp Linux driver. Thanks to Ville Valkonen <weezeldinga at gmail dot com> for testing. ok mglocker@
* Add uhidev_set_report_dev() allowing usb drivers to early on install aanton2021-02-042-5/+25
| | | | | | | handler for a specific report id. Needed by an upcoming driver in order to communicate with the device already in the attach routine. ok mglocker@ as part of a larger diff
* After the rev. 1.108 commit we see some issues with ugen(4) behaviour,mglocker2021-02-031-1/+5
| | | | | | | | | | which finally makes umb(4) fail, since ugen(4) attaches to one of the umb(4) interfaces, fails, and marks the whole device dying. Therefore make usbd_device2interface_handle() backwards compatible again. Problem reported by Mikolaj Kucharski. ok edd@
* Align the mixed naming for the variables used to reference tomglocker2021-02-014-31/+31
| | | | | | | | | bInterfaceNumber and bAlternateSetting as following: ifaceidx -> ifaceno altidx -> altno Suggested and ok mpi@
* update remaining usb.org URLssthen2021-01-294-12/+12
|
* update usb.org URLssthen2021-01-293-7/+7
|
* update some usb.org URLs following reorganisation, add a new one for updsthen2021-01-296-13/+15
| | | | partly from Alessandro Ricci
* 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@