summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
AgeCommit message (Collapse)AuthorFilesLines
2021-04-01Push kernel lock down to umb_rtrequest().mvs1-1/+3
We are going to unlock PF_ROUTE sockets. This means `if_rtrequest' handler will be performed without kernel lock. umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler which requires kernel lock to be held. So push the lock down to umb_rtrequest() instead of grab it around `if_rtrequest' call. This hunk was commited separately for decreases PF_ROUTE sockets unlocking diff. ok gerhard@ deraadt@
2021-03-31syncsthen2-54/+54
2021-03-31Remove redundant "HUAWEI Mobile" in usbdevs strings, mention radiosthen1-26/+26
technology where known. ok deraadt
2021-03-30fix typos in commentssthen1-3/+3
2021-03-30Some cards announce support for the NTB16 format, but that support does notpatrick3-41/+167
work. Hence, add support for NTB32 in the transmit path. We already have support for NTB32 in the receive path. We detect the supported format on boot and can then decide on transmit which format to use. From ehrhardt@ with gerhard@ Tested by jan@ ok sthen@
2021-03-30Some umb(4) devices require the NDP pointer behind the NDP datagram.patrick2-36/+59
From gerhard@ "broadly OK" sthen@
2021-03-29combine umb_products and umb_fccauth_devs into one umb_quirks tablesthen1-36/+51
ok gerhard@
2021-03-28Add vid/pid table to umb(4) allowing matching to alternate configsthen1-3/+64
Some devices present multiple configurations and the one chosen by default is not always usable - for example, some have an CDC ECM config that does not work with our cdce(4) - allow overriding to a specific config in those cases. From gerhard@ with tweaks to comments by me, ok patrick@
2021-03-28syncsthen2-4/+14
2021-03-28add pid for Dell DW5821e and HUAWEI ME906s LTE, ok patrick@sthen1-1/+3
2021-03-27trim the FCS off Ethernet packets before sending them up the stack.dlg1-1/+8
Jurjen Oskam on tech@ found that ure in a veb caused these extra fcs bytes to be transmitted by other veb members. the extra bytes aren't a problem usually because our network stack ignores them if they're present, eg, the ip stack reads an ip packet length and trims bytes in an mbuf if there's more. bridge(4) masked this problem because it always parses IP packets going over the bridge and trims them like the IP stack before pushing them out another port. veb(4) generally just moves packets around based on the Ethernet header, by default it doesn't look too deeply into packets, which is why this issue popped out. it is more correct for ure to just not pass the fcs bytes up. ok jmatthew@ kevlo@
2021-03-24syncsthen2-6/+6
2021-03-24remove vendor name (Dell) repeated in product namesthen1-2/+2
2021-03-24Define a USB quirk for devices that need to keep their pipes open atjcs4-14/+63
all times, before the device is enabled and after the device is disabled by wscons. This was originally needed by umt for the Microsoft Surface Type Cover to avoid it resetting (or at least detaching and reattaching) when the touchpad was touched while at the console. A similar problem occurs with the Pinebook Pro's keyboard when switching from X to the console due to the touchpad getting disabled, so add it to ums as well. with and ok kurt
2021-03-24regenjcs2-4/+16
2021-03-24add HAILUCK Keyboardjcs1-1/+5
from kurt
2021-03-18In revision 1.91 of uhidev.c, jcs@ made sure to only detach devicesanton3-22/+3
claiming multiple report ids once. This allows uhidpp to piggy back on the same functionality making uhidev_unset_report_dev() redundant.
2021-03-17When devices have claimed multiple report ids, only detach and sendjcs1-17/+34
DVACT_DEACTIVATE to them once when walking sc_subdevs. Fixes a regression reported and tested by Edd Barrett. Input from and previous version ok anton.
2021-03-08Add another Type Cover devicejcs1-1/+2
from Fredrik Engberg
2021-03-08regenjcs2-4/+9
2021-03-08Add Surface Pro Type Coverjcs1-1/+2
from Fredrik Engberg
2021-03-08Allow uhidev child devices to claim selective report idsjcs16-57/+74
There may be multiple matching devices on a single uhidev device but the first device that responds to UHIDEV_CLAIM_ALLREPORTID will block the others from attaching. Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any devices wanting some/all report ids to fill in the claimed array in uhidev_attach_arg with just the reports it needs. uhidev can then run match routines for other drivers with the available report ids. ok anton
2021-02-27regenjsg2-55/+55
2021-02-27sort and fix RTL8713 idjsg1-12/+12
2021-02-25we don't have to cast to caddr_t when calling m_copydata anymore.dlg5-14/+14
the first cut of this diff was made with coccinelle using this spatch: @rule@ type caddr_t; expression m, off, len, cp; @@ -m_copydata(m, off, len, (caddr_t)cp) +m_copydata(m, off, len, cp) i had fix it's opinionated idea of formatting by hand though, so i'm not sure it was worth it. ok deraadt@ bluhm@
2021-02-24remove unused usbd_get_device_string()jsg1-21/+1
ok mpi@
2021-02-24remove unused usbdi functionsjsg2-44/+2
ok mpi@
2021-02-24remove unused xhci_cmd_evaluate_ctx()jsg1-22/+1
ok mpi@
2021-02-16Poll battery sensors less frequently. The previous period was quiteanton1-2/+2
arbitrary and inspired by other USB drivers.
2021-02-16Trim uhidpp_device_features() by extracting two pure protocol functions.anton1-18/+52
2021-02-15Back-out USB data toggle fix for HID devices, since we received multiplemglocker1-43/+1
reports about broken devices, e.g. for ukbd(4) and fido(4). ok mpi@
2021-02-14Postpone installation of the periodic sensor task until at least oneanton1-2/+4
device has connected.
2021-02-14Bail out earlier during attach if no devices are paired with theanton1-4/+7
receiver.
2021-02-14Enumerate all features supported by a device on connect.anton1-6/+93
Should help diagnose various reports regarding missing battery sensors.
2021-02-11Initialize the stack local device id variable correctly.anton1-2/+2
CID 1501705
2021-02-11Make room for handling of HID++ 1.0 devices. No functional change.anton1-56/+69
2021-02-11Use idx suffix consistently.anton1-17/+17
2021-02-11Remove unused software id macro.anton1-2/+1
2021-02-11Fold long line.anton1-2/+3
2021-02-11Stop uhidpp from claiming all report ids, instead only claim theanton1-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@
2021-02-11Add uhidev_unset_report_dev(), doing the opposite ofanton2-2/+13
uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp. ok mglocker@
2021-02-11If uhidev_set_report_dev() already have been invoked for the givenanton1-4/+6
report id, there's no point in trying to find a matching sub device. ok mglocker@
2021-02-05Prevent that when ugen(4) tries to set an alternative configurationmglocker1-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@
2021-02-04Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton2-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@
2021-02-04Add uhidev_set_report_dev() allowing usb drivers to early on install aanton2-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
2021-02-03After the rev. 1.108 commit we see some issues with ugen(4) behaviour,mglocker1-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@
2021-02-01Align the mixed naming for the variables used to reference tomglocker4-31/+31
bInterfaceNumber and bAlternateSetting as following: ifaceidx -> ifaceno altidx -> altno Suggested and ok mpi@
2021-01-29update remaining usb.org URLssthen4-12/+12
2021-01-29update usb.org URLssthen3-7/+7
2021-01-29update some usb.org URLs following reorganisation, add a new one for updsthen6-13/+15
partly from Alessandro Ricci