summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2022-02-21ambigus -> ambiguousJonathan Gray
2022-02-21diviedr -> dividerJonathan Gray
2022-02-16Currently, wskbd_set_mixervolume() only adjusts the volume of the firstAnton Lindqvist
attached audio device, i.e. audio0. This approach does not work well while using additional audio devices equipped with physical volume keys since those would only affect the volume of audio0. Instead, correlate audio and ucc devices attached over USB in order to adjust the volume of the correct audio device. This is done by passing a cookie from the common point of attachment which is later used to correlate the audio and wskbd device. The same approach could be adopted for audio and wskbd devices attaching on a different bus. Keep in mind that it's of importance to make use of and increment the same global cookie identifier to avoid collisions. Makes the volume keys on my Logitech G435 Headset do the right thing. ok ratchov@
2022-02-16Make room for a cookie argument passed to audio_attach_mi(). CurrentlyAnton Lindqvist
unused but intended to be used to correlate audio and wskbd devices. ok ratchov@
2022-02-05Only install the sensors once as multiple devices can be paired with theAnton Lindqvist
same receiver. Prevents a newly added assertion from triggering. Problem reported by Joel Carnat <joel at carnat dot net> on bugs@
2022-01-28When it's the possessive of 'it', it's spelled "its", without thePhilip Guenther
apostrophe.
2022-01-26shrink uca.ibufsize from UCHCOMIBUFSIZE to wMaxPacketSize of bulk-in pipeSASANO Takayoshi
USB transaction is finished when whole requested data has transferred, or short packet (the size is less than wMaxPacketSize) has sent. UCHCOMIBUFSIZE(256) was multiply of wMaxPacketSize(32). When CH340 sends exact wMaxPacketSize byte packet, this will cause Rx jam problem due to transaction is not finished. Now uca.ibufsize is same as wMaxPacketSize to avoid this problem. ok kevlo@
2022-01-26Rework initialization of sensors on device connect.Anton Lindqvist
2022-01-11Remove KASSERT(0) and default switch case. No other sc_ncm_formatClaudio Jeker
switch has a default case and umb_ncm_setup_format() ensures that only 16 and 32bit formats are accepted. Fixes build error without DIAGNOSTIC set. Found by and OK robert@
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2021-12-31spellingJonathan Gray
ok ratchov@
2021-12-31Fix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init().Jonathan Matthew
from Brad
2021-12-30Add Xiaomi MiniWif to list of devices supported by mtw(4).Kevin Lo
Works for me on amd64. ok hastings@
2021-12-24Support more mtw(4) devices.hastings
ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@
2021-12-24regenhastings
2021-12-24Add some more mtw(4) devices.hastings
ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@
2021-12-23Get rid of unused next battery level argument.Anton Lindqvist
2021-12-21knf nitsAnton Lindqvist
2021-12-21avoid returning uninitialised var in hidpp_send_report()Jonathan Gray
ok anton@
2021-12-20Make mtw(4) known to the config(8) framework.hastings
Not enabled yet. Pending firmware availability. ok stsp@ jmatthew@
2021-12-20Add mtw(4), a driver for MediaTek MT7601U wifi devices.hastings
Ported from run(4) with legacy chipsets removed. Not yet enabled in the build. ok stsp@ jmatthew@
2021-12-13Handle multi-port controllers in uslcom(4)Visa Hankala
A multi-port CP210x device presents each COM port as a separate USB virtual COM port interface. When attaching uslcom(4), take the USB interface from the attach arguments instead of using interface 0. This lets the driver access the different ports of a quad-port CP2108. Tested with a single-port CP2102 by jsg@ OK jsg@ deraadt@
2021-12-05add missing mtx_leave() calls in error pathsJonathan Gray
ok anton@
2021-12-04Consolidate error paths in usbd_new_device, shaving of 14 lines.Anton Lindqvist
ok bluhm@
2021-12-03Bring back the recently reverted change, this time without the invertedAnton Lindqvist
conditional. Repeating the previous commit messsage: Assert that at least one report id is claimed during multiple report ids attachment. Should prevent uhidev drivers from doing the wrong thing in their corresponding match routine. Tested by dv@
2021-11-28SpacingMarcus Glocker
2021-11-28utvfu(4) only has one frame size, either for PAL or NTSC. ThereforeMarcus Glocker
return EINVAL after the first frame size has been returned in the VIDIOC_ENUM_FRAMESIZES ioctl. ok mpi@
2021-11-28Align with the recent memory allocation changes we did for the otherMarcus Glocker
USB HC drivers; M_DEVBUF -> M_USBHC. ok kettenis@
2021-11-25revert recent change, breakage reported by dv@Anton Lindqvist
2021-11-25Assert that at least one report id is claimed during multiple report idsAnton Lindqvist
attachment. Should prevent uhidev drivers from doing the wrong thing in their corresponding match routine.
2021-11-24Spacing and remove an unused macro.Marcus Glocker
2021-11-24SpacingMarcus Glocker
2021-11-24Fix panic when running utvfu(4) on xhci(4).Marcus Glocker
tested and ok ian@
2021-11-22use ISC license for ubcmtpJoshua Stein
2021-11-22M_USB -> M_USBHCMarcus Glocker
2021-11-22Drop the old problematic claim multiple report ids logic now that allAnton Lindqvist
uhidev drivers have been fixed.
2021-11-22Add missing claim multiple report ids conditionals to uhidev drivers.Anton Lindqvist
2021-11-22Align memory allocation for USB device drivers and USB HC drivers:Marcus Glocker
* USB device drivers use M_USBDEV instead of M_DEVBUF. * USB HC drivers use M_USBHC instead of M_DEVBUF. In a vanilla setup, this enlarges the USB memory pool. ok anton@
2021-11-22avoid clang -Wsometimes-uninitialized warning with SMALL_KERNELJonathan Gray
2021-11-19whitespace tweaks. no functional change.David Gwynne
a lot more knf could be sprinkled in this file...
2021-11-19let CH340 chips keep working in 8N1 mode.David Gwynne
they get confused if you try to configure them and don't work at all otherwise. CH341 seems fine otherwise. from miod tested by me and Felix Kronlage-Dam
2021-11-17uhidpp does claim multiple report idsAnton Lindqvist
2021-11-17ucc does not claim multiple report idsAnton Lindqvist
2021-11-17Fix a double free in uhidev_close() caused by a race betweenAnton Lindqvist
uhidev_open() and uhidev_close(). In uhidev_close() the UHIDEV_OPEN flag is cleared early on but the same thread can end up sleeping while closing the input or output pipe. This allows another thread to enter uhidev_open() but only to fail opening either the input or output pipe since they are already open for exclusive use. The uhidev_open() error path frees the input buffer but leaves a dangling pointer around; causing uhidev_close() to free the same buffer. This can at least happen on xhci(4) which can end up sleeping in xhci_pipe_close(). Reported by and ok gnezdo@
2021-11-15Third attempt to solve the claim multiple report ids conflict. Using theAnton Lindqvist
report id to signal that multiple ones should be claimed by the match routines does not work. All valid report ids 1-255 cannot of course be used and 0 which is reserved by the USB HID specification is internally used to represents devices lacking an explicit report id. Therefore, use presence of the claimed array to signal that multiple report ids can be claimed. Tested by gnezdo@
2021-11-15In preparation for once again trying the resolve the claim multipleAnton Lindqvist
report ids conflict, extract the claim multiple report ids conditional in order to minimize the required upcoming changes to resolve the conflict. Tested by gnezdo@
2021-11-11Here we go again, revert the second attempt to resolve theAnton Lindqvist
UHIDEV_CLAIM_MULTIPLE_REPORTID conflict. Breaks fido(4) as reported by gnezdo@
2021-11-10Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, thisAnton Lindqvist
time without using sentinel that cannot be represented using a single byte. Instead, use 0 as this report ID is reserved according to the USB HID specification. Fixes attachment of some upd devices which exposes up to 256 report IDs. Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and testing.
2021-11-09The uhidevsubmatch() routine was imported from NetBSD back in 2002 along withAnton Lindqvist
the reportid locator. The same locator was removed in 2004 making the routine redundant. ok gnezdo@ mpi@
2021-11-08Plug uhidev memory leak during detach.Anton Lindqvist
Thanks to Damien Couderc <openbsd at petrocore dot eu> for testing and ok gnezdo@