Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| a76e37e6 | 2022-01-11 10:34:13 | Remove KASSERT(0) and default switch case. No other sc_ncm_format 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@ | ||
| 4b1a56af | 2022-01-09 05:42:36 | spelling feedback and ok tb@ jmc@ ok ratchov@ | ||
| d3677684 | 2021-12-31 23:19:50 | spelling ok ratchov@ | ||
| 093575dd | 2021-12-31 08:15:47 | Fix up handling of IFF_ALLMULTI and call uaq_iff() from uaq_init(). from Brad | ||
| 54a76c43 | 2021-12-30 15:09:49 | Add Xiaomi MiniWif to list of devices supported by mtw(4). Works for me on amd64. ok hastings@ | ||
| acaa8857 | 2021-12-24 06:53:18 | Support more mtw(4) devices. ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@ | ||
| 9d2191b7 | 2021-12-24 06:19:24 | regen | ||
| 2f4c4673 | 2021-12-24 06:18:11 | Add some more mtw(4) devices. ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@ | ||
| ad8c1ddc | 2021-12-23 12:14:15 | Get rid of unused next battery level argument. | ||
| b73a164c | 2021-12-21 11:46:01 | knf nits | ||
| 731cc6c2 | 2021-12-21 07:44:22 | avoid returning uninitialised var in hidpp_send_report() ok anton@ | ||
| f225ca39 | 2021-12-20 14:54:37 | Make mtw(4) known to the config(8) framework. Not enabled yet. Pending firmware availability. ok stsp@ jmatthew@ | ||
| 57a8187d | 2021-12-20 13:59:02 | Add mtw(4), a driver for MediaTek MT7601U wifi devices. Ported from run(4) with legacy chipsets removed. Not yet enabled in the build. ok stsp@ jmatthew@ | ||
| 9f9a31e0 | 2021-12-13 13:57:48 | Handle multi-port controllers in uslcom(4) 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@ | ||
| 52240835 | 2021-12-05 15:35:32 | add missing mtx_leave() calls in error paths ok anton@ | ||
| d7317b54 | 2021-12-04 07:01:59 | Consolidate error paths in usbd_new_device, shaving of 14 lines. ok bluhm@ | ||
| e0050fab | 2021-12-03 06:34:38 | Bring back the recently reverted change, this time without the inverted 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@ | ||
| c00e5c15 | 2021-11-28 14:10:32 | Spacing | ||
| dcbbabc2 | 2021-11-28 13:57:37 | utvfu(4) only has one frame size, either for PAL or NTSC. Therefore return EINVAL after the first frame size has been returned in the VIDIOC_ENUM_FRAMESIZES ioctl. ok mpi@ | ||
| 6303db42 | 2021-11-28 09:25:02 | Align with the recent memory allocation changes we did for the other USB HC drivers; M_DEVBUF -> M_USBHC. ok kettenis@ | ||
| cf8183f3 | 2021-11-25 20:31:24 | revert recent change, breakage reported by dv@ | ||
| 2b3e5a55 | 2021-11-25 06:25:32 | 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. | ||
| 0c1e16a8 | 2021-11-24 22:03:05 | Spacing and remove an unused macro. | ||
| 7826e0f1 | 2021-11-24 21:57:56 | Spacing | ||
| 0712c17e | 2021-11-24 21:47:14 | Fix panic when running utvfu(4) on xhci(4). tested and ok ian@ | ||
| 6169a18d | 2021-11-22 22:12:37 | use ISC license for ubcmtp | ||
| 3dfa0d79 | 2021-11-22 11:46:11 | M_USB -> M_USBHC | ||
| 3286dae3 | 2021-11-22 11:30:16 | Drop the old problematic claim multiple report ids logic now that all uhidev drivers have been fixed. | ||
| 36b6d2a9 | 2021-11-22 11:29:17 | Add missing claim multiple report ids conditionals to uhidev drivers. | ||
| 8985a220 | 2021-11-22 10:17:14 | Align memory allocation for USB device drivers and USB HC drivers: * 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@ | ||
| d3bc19d9 | 2021-11-22 03:30:20 | avoid clang -Wsometimes-uninitialized warning with SMALL_KERNEL | ||
| 7f3e0614 | 2021-11-19 07:58:34 | whitespace tweaks. no functional change. a lot more knf could be sprinkled in this file... | ||
| e219843c | 2021-11-19 07:56:53 | let CH340 chips keep working in 8N1 mode. 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 | ||
| e7f3461c | 2021-11-17 06:22:14 | uhidpp does claim multiple report ids | ||
| 0339b960 | 2021-11-17 06:21:23 | ucc does not claim multiple report ids | ||
| 5331a82c | 2021-11-17 06:20:30 | Fix a double free in uhidev_close() caused by a race between 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@ | ||
| befafe11 | 2021-11-15 15:38:08 | Third attempt to solve the claim multiple report ids conflict. Using the 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@ | ||
| faac88c0 | 2021-11-15 15:36:24 | In preparation for once again trying the resolve the claim multiple 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@ | ||
| 919cc5e9 | 2021-11-11 07:04:45 | Here we go again, revert the second attempt to resolve the UHIDEV_CLAIM_MULTIPLE_REPORTID conflict. Breaks fido(4) as reported by gnezdo@ | ||
| ed0cd979 | 2021-11-10 06:33:30 | Second attempt to resolve UHIDEV_CLAIM_MULTIPLE_REPORTID conflict, this 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. | ||
| b21bb9a8 | 2021-11-09 06:25:42 | The uhidevsubmatch() routine was imported from NetBSD back in 2002 along with the reportid locator. The same locator was removed in 2004 making the routine redundant. ok gnezdo@ mpi@ | ||
| a49bda3d | 2021-11-08 07:05:21 | Plug uhidev memory leak during detach. Thanks to Damien Couderc <openbsd at petrocore dot eu> for testing and ok gnezdo@ | ||
| 990261ac | 2021-11-05 11:38:51 | Constify struct cfattach. | ||
| 0b89560c | 2021-11-02 09:52:40 | add handling for parity and character size config. i wanted to talk modbus to a thing using a uchcom rs485 adapter, but i needed even parity enabled to do that which the code didnt support. this pulls in the necessary changes from netbsd uchcom.c r1.26. it does not pull in the reset changes in 1.26 because netbsd r1.28 reverts the reset code back to what we have now. existing functionality tested by felix kronlage-dammers ok patrick@ | ||
| 0ff00077 | 2021-11-01 12:08:46 | Restore some NULL checks lost in r1.132, add a couple more to deal with WEP key installation happening w/o a node, and don't attempt to set WEP keys that don't exist. Should fix the '(null node)' panics reported by James Hastings. ok stsp@ | ||
| 937de54f | 2021-10-31 12:24:02 | Make athn(4) attach to the Sony UWA-BR100. Patch by martingot@protonmail | ||
| 4ee1c150 | 2021-10-31 12:23:17 | regen | ||
| 4391a17a | 2021-10-31 12:22:48 | Add USB device ID for the Sony UWA-BR100. Patch by martingot@protonmail | ||
| ac5ee598 | 2021-10-31 12:17:54 | Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures. Problem found and fix tested by krw@. ok krw@ | ||
| 671067d0 | 2021-10-30 11:56:19 | Revert previous commit as it's causing panic when devices are detached ok sthen, anton | ||
| 57aafeb6 | 2021-10-29 15:43:55 | A USB HID report ID must be represented using a single byte ranging between 1-255 where 0 is reserved. The pseudo report ID UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid report ID 255. Therefore crank it which gets rid of the collision and increase the related fields in order to cope with larger integers. Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and testing. | ||
| 2e8dbc7d | 2021-10-29 14:25:05 | match more Prolific HXN ids tested by robert@ on PL2303GT ok deraadt@ robert@ patrick@ | ||
| 9a131efa | 2021-10-29 14:23:07 | regen | ||
| 19cc58a0 | 2021-10-29 14:22:26 | more Prolific HXN ids ok deraadt@ robert@ patrick@ | ||
| c8ebe74c | 2021-10-27 09:09:55 | fix spello in comment | ||
| ec12b9df | 2021-10-26 16:49:12 | Add a new TEMPerHUM device id. style tweak deraadt@, ok mlarkin@ | ||
| 27b5a9d5 | 2021-10-26 16:29:49 | Improve unhibernate performance (30% on some machines, another upcoming diff shows gains up to 50%) by skipping attach of irrelevant devices, which are tagged CD_SKIPHIBERNATE in the per-driver cfdriver. In particular, usb devices are not attached, so they don't need to detach during the suspend-unpack-resume. New bootblocks are required (which tell the kernel it's job is unhibernate before configure runs) tested by various | ||
| 1e1b982a | 2021-10-04 01:33:42 | Build firmware for rsu(4), rtwn(4), and urtwn(4). We have to install the files with new filenames (removal of "fw" from each of the filenames) and change the driver to use the new filenames, such that the package becomes irrelevant. Discussed with deraadt@ and sthen@ ok deraadt@ | ||
| 11ad9ee5 | 2021-09-24 08:50:57 | regen | ||
| 0d18b60b | 2021-09-24 05:25:37 | Add support for SIMCom SIM7600. To issue AT commands (AT+CUSBPIDSWITCH=9003,1,1 and AT+CLANMODE=1) to change to MBIM mode. ok deraadt@ | ||
| 84169f27 | 2021-09-20 17:32:39 | Changing the encoding of a ucc keyboard doesn't make sense as only one encoding is supported. Instead, silently ignore such requests. Gets rid of the following warning emitted by kbd(8) while booting with a ucc keyboard attached and /etc/kbdtype being present: kbd: unsupported encoding uk on /dev/wskbd2 I ended up repurposing KB_MACHDEP as is became unused back in 2008. Note that running a kernel with this commit applied requires kbd and wsconsctl to be recompiled in order to show correct encodings. Problem reported by landry@ and ok deraadt@ | ||
| 09ed7d4e | 2021-09-15 04:57:47 | Change the errno to ENOTTY when encountering an unknown ioctl command as opposed of using EINVAL which is ambiguous in this context. ok deraadt@ | ||
| 6cdbbe9b | 2021-09-12 06:58:08 | Revert recent uhidev report size changes. It's reported to break fido devices for as of now unknown reasons. | ||
| b7ded75d | 2021-09-10 05:48:43 | Minor KNF nit, align struct field. | ||
| adb06565 | 2021-09-10 05:47:38 | Instead of letting uhidev drivers get the report sizes, do it once in uhidev and pass the same sizes as part of the attach arguments. Makes the uhidev drivers a bit less repetitive. It might look tempting to let uhidev assign the sizes after a driver has attached, removing the need to repeat this logic in each driver. This does however not work since the input size must be known while calling uhidev_open() in order to open the interrupt pipe; and uhidev_open() is called from several attach routines. Note that this change only works and applies to when attaching to a single report ID. ok jcs@ | ||
| 9d1e72ff | 2021-09-10 05:46:01 | Remove unused repsizes array. ok jcs@ as part of a larger diff | ||
| f436debf | 2021-09-05 16:16:13 | This allows us to disable usb(4) without kernel crash. ok mpi@ | ||
| 497492a7 | 2021-09-04 12:11:45 | Add uaq(4), a driver for Aquantia AQC111U/AQC112U USB ethernet devices. hardware provided by Brad tested with modest success by mlarkin@, kevlo@ and Brad ok kevlo@ | ||
| 402cdca0 | 2021-09-04 10:19:28 | Revert list_move() to list_move_tail() change from last commit since it turned out that it has a negative impact to isoc transfers timing with our driver implementation. | ||
| 58facf33 | 2021-09-02 15:15:12 | Explain in a comment why two wscons_keydesc structures are needed. | ||
| 56cfa246 | 2021-09-01 10:41:39 | Add support for the more rare volume usage which differs compared to the more common volume increment/decrement usages in which each volume change direction is represented using a distinct usage. The volume usage instead uses bits of the interrupt buffer to represent the wanted volume. The same bits should be within the bounds given by the logical min/max associated with the HID item. However, the volume is not interpreted as an absolute value but rather just looking at the sign bit in order to determine the volume change direction. I couldn't find any documentation of this usage and the implementation is therefore solely based on analysing actual data from Richard Toohey's <richardjtoohey at gmail dot com> Dell keyboard. | ||
| c684bd44 | 2021-09-01 10:40:19 | Rename ucc_bits_to_usage() to ucc_bits_to_int() as it's about to be used in more than one context. | ||
| 5f3f6390 | 2021-08-31 22:56:24 | regen | ||
| 76f25408 | 2021-08-31 22:55:56 | Add Aquantia USB ethernet devices from Brad originally | ||
| a818e483 | 2021-08-31 05:17:49 | In enumerating mode, calculate the bit offset using the HID input location as the product of the corresponding Report Count and Report Size can be greater than one. Fixes Richard Toohey's <richardjtoohey at gmail dot com> Dell keyboard. | ||
| 087025f8 | 2021-08-31 05:16:45 | Protect against missing bit to key symbols in ucc_bit_to_sym(). This can only happen if ucc_hid_parse() has a bug, better play it safe. | ||
| b10b41fc | 2021-08-29 19:00:59 | Pass volume related key presses as both raw and translating input to wskbd in order to make them visible in X11. Matches what ukbd(4) already does. | ||
| 2c3f1775 | 2021-08-29 18:31:08 | correct range upper bound in comment | ||
| 9a1fff4f | 2021-08-29 18:21:16 | Make the ucc match criteria more stringent by requiring at least one usage greater than zero. Usage zero is defined as unassigned by the specification and cannot be mapped to anything sensible. Prevents ucc from attaching to bunch of odd report IDs from a Lenovo ThinkPad USB-C Dock which only exposes the unassigned usage. This is not a problem in practice but I think we're better attaching them as uhid devices instead as ucc cannot provide any functionality. Thanks to Mario Peter <mp at mpeter dot de> for reporting and testing. | ||
| 4e984ffc | 2021-08-29 18:20:18 | Some reports embeds multiple report IDs inside the same collection causing ucc to only being able to attach to the last report ID. This in turn is caused by hid_is_collection() only being able to observe an end of collection item with the last report ID for the same collection. Instead, change the matching of ucc to only consider report IDs with at least one corresponding Consumer Control usage. Fixes gnezdo@'s Google Pixel earbuds. | ||
| cae1a3da | 2021-08-29 18:19:09 | An interrupt report contains the state of all items (Input, Output and Feature) from the corresponding descriptor report for a given report ID. The ordering of the items is identical in both the descriptor and interrupt report. As the interrupt report can cover more than Consumer Control related key presses, ucc must be more careful while examining the interrupt report in order to not confuse other items as key presses. While parsing the descriptor report, take note of the bits that represents Consumer Control key presses and use it to slice the interrupt report. Thanks to florian@ gnezdo@ and Alessandro De Laurenzis <just22 at atlantide dot mooo dot com> for testing. | ||
| 54c1f2a6 | 2021-08-29 18:17:51 | As the Consumer Control usages are well defined by the HID Usage Tables specification ucc might as well enumerate all of them. Finding an appropriate scan code recognized by X11 for each usage is more tricky. I've added a few more but the majority are still unmapped. Linux has defined a couple of more usages covered by the evdev[1] key codes but those symbols are not picked up in an vanilla X11 configuration on OpenBSD, according to setxkbmap(1). This should at least lower the barrier for adding scan codes for wanted keys. Note that the strings are discarded unless UCC_DEBUG is enabled. Thanks to gnezdo@ for testing. [1] xenocara/dist/xkeyboard-config/keycodes/evdev | ||
| 7d0b4a73 | 2021-08-26 10:32:35 | Rename ucc_intr_to_usage() to ucc_bits_to_usage(), no functional change. | ||
| 0677f197 | 2021-08-26 10:29:02 | Add missing leading colon to error message. | ||
| 57f3bdf6 | 2021-08-25 05:48:50 | Make all conversion routines consistent by returning a struct ucc_keysym. No functional change. | ||
| da425875 | 2021-08-25 05:48:02 | Remove the KB_DEFAULT flag from the wskbd keymap layout. Presence of this flag will cause wskbd to discard the given keymap layout and instead favor the layout of the associated wsmux. This is not a problem while attaching ucc(4) during boot as the wsmux uses the default layout at this point. However, if the layout is changed using /etc/kbdtype from rc(8) during boot, attaching ucc(4) at this point would cause wskbd_attach() to get stuck in an infinite loop: wskbdX: cannot load keymap, falling back to default ... which in turn is caused by ucc(4) only providing a us layout and using anything else in /etc/kbdtype would not work. I missed this as I don't use /etc/kbdtype but cwen@ and Mazzurco Riccardo <mazzurco dot riccardo at protonmail dot com> reported the same problem. | ||
| 20c31238 | 2021-08-25 05:47:15 | Prevent ucc(4) from matching report IDs with an empty input report. Fixes cwen@'s Creative BT-W3 audio device. | ||
| 71e59321 | 2021-08-25 05:46:31 | If the buffer given to the ucc interrupt handler is too long, do not discard it but instead just inspect the first bytes that can make up a usage. This is a work around as the correct solution is to only inspect a limited number of bits as given by the report count and size associated with the Consumer usage page. Final piece to get florian@'s Microsoft Sculpt keyboard working. | ||
| cfd7874d | 2021-08-25 05:45:33 | Determine if a hid item is an array by solely inspecting presence of associated min/max boundaries. Assuming that every usage array starts with the Control usage is incorrect. Fixes claudio@'s GMMK keyboard and partial fix for florian@'s Microsoft Sculpt keyboard. | ||
| 08861470 | 2021-08-24 10:53:43 | Some consumer control descriptor reports uses an array of usages instead of enumerating all supported ones. This representation is more compact as all supported usages are given by the array min and max boundaries. In enumerating mode, the interrupt report has one level indirection as it includes the bit offset of the usage requiring the driver to map bits to usages in order to resolve the key press. In array mode, the interrupt report includes the usage without any indirection, removing the need map bits to usages. ucc(4) can now operate either in enumerating or array mode depending on the descriptor report. This should make more keyboards usable. Thanks to Alessandro De Laurenzis <just22 at atlantide dot mooo dot com> for testing. | ||
| 50fb1c23 | 2021-08-23 17:50:26 | I missed that wskbd_rawinput() is hidden behind WSDISPLAY_COMPAT_RAWKBD as discovered by deraadt@; should hopefully make ucc(4) work on alpha. | ||
| c9c68f2d | 2021-08-22 07:20:40 | Since the raw keymap already has a capacity of holding all present keys, use it as a lookup table using the bit as the index. Removes the need to linearly scan the same keymap during handling of a key press, not that performance matters here since the length of the keymap is small but the code gets a bit simpler and one struct becomes redundant. While here, fix two incorrect conditionals in ucc_parse_hid() which compared two different quantities. | ||
| 86767518 | 2021-08-21 06:52:52 | fix indent in previous | ||
| 83811a03 | 2021-08-21 02:43:35 | refactor to resolve unused variable on non-WSDISPLAY_COMPAT_RAWKBD arch | ||
| bdbba0eb | 2021-08-20 05:23:18 | Add ucc(4), a driver for USB HID Consumer Control keyboards. Such keyboard is a pseudo device which is used to expose audio and application launch keys. My prime motivation is to get the volume mute, increment and decrement keys to just work on my keyboard without the need to use usbhidaction(1). Looks reasonable to kettenis@ mpi@ and ok jcs@ | ||
| ca35d093 | 2021-08-20 04:54:10 | Back out last commit. deraadt@ pointed out that the operation is correct. It attaches, but by then it is being pulled. The dying flag is set to avoid half the kinds of failure conditions. The other half of the failure conditions are detect on-the-spot. And it seems when compiled for debug, this on-the-spot check which notices the device isn't there, has a printf. | ||
| 05787332 | 2021-08-20 01:40:51 | When plugging and unplugging an adapter continuously, it waits for a timeout over and over again. The problem is that the device has been unplugged, but the attach handler still issues USB requests via ure_ctl(). The easiest solution is to deactivate the device proactively in ure_ctl() when we see that error there. From Christian Ludwig | ||
| 41e23fe7 | 2021-08-17 11:30:45 | For devices with rechargeable batteries, expose a new boolean sensor indicating the charging state. Thanks to Laurence Tratt <laurie at tratt dot net> for testing. | ||
| 44b1ea5e | 2021-08-17 05:56:24 | Set the battery level sensor status to unknown while the battery is charging as some devices reports a level of zero during charging. Prevents certain sensorsd.conf actions from triggering as a battery level of zero would otherwise set the sensor status to critical. Thanks to Laurence Tratt <laurie at tratt dot net> for the report. | ||
| 80d52e26 | 2021-08-13 01:24:22 | Remove unused ure_stop_task (from Christian Ludwig of genua.de) The ure_stop_task is not scheduled anywhere. Compile tested here. |