summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2021-11-16fix typo in an error message printed by iwm_phy_ctxt_update()Stefan Sperling
2021-11-16hilkbd(4): Fix swedish keyboard layout botch on non-PS/2 style keyboardsLandry Breuil
introduced in 1.7 and preventing `o' and `p' keys from working as intended. Reported by Anders Gustafsson. From miod@
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-12Add support for 40MHz channels to the iwn(4) driver.Stefan Sperling
Tested: 4965: jsg 5300: stsp, Jan Stary 6030: Fred Crowsons 6200: stsp 6205: stsp, Josh Grosse 6300: okan, afresh1
2021-11-12Sync the iwn(4) "enhanced Tx power" eeprom data structure with Linux.Stefan Sperling
No functional change, as this data is not being used anywhere yet.
2021-11-11Fix iwn(4) with 4965 devices.Stefan Sperling
Our driver was using the wrong data structure for RXON_ASSOC commands on 4965 devices. This resulted in fatal firmware errors during association. Problem found and fix tested on 4965 by jsg@. Patch also tested on 6200 by me.
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-09Add gpiokeys(4) for arm64Klemens Nanni
This driver handles events triggered by GPIO keys such as lid status and power button. OK kettenis
2021-11-09Sort gpio{leds,charger}Klemens Nanni
2021-11-09Add IPv4, TCP4/6 and UDP4/6 checksum offloading.Jan Klemkow
ok jmatthew@
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@
2021-11-07Fall back to label if function is missingKlemens Nanni
The "label" property is obsolete and "function" should be used, but devices like the Raspberry Pi 4b still use it. Detect LEDs on such machines: -gpioleds0 at mainbus0: no LEDs +gpioleds0 at mainbus0: "led0", "led1" OK patrick
2021-11-07Simplify print logicKlemens Nanni
OK patrick
2021-11-07Constify struct cfattach, not struct cfdriver.Patrick Wildt
Fixes panic seen on the Pinebook Pro.
2021-11-07Fix handling of interrupts shared between multiple dwiic(4) devices.Stefan Sperling
Interrupt sharing did not work correctly when two dwiic(4) devices share an interrupt line. We ended up with an interrupt storm. One of the two interrupt handlers would see interrupt status bits set to zero but claim the interrupt regardless. The second handler would never get to run, and the interrupt condition on the second device was not cleared as a result. Fix this by returning zero from dwiic_intr() if the device's interrupt status bits read back as zero. The storm occurred as soon as X11 was started. xenodm(1) never managed to display its login prompt. Observed on the Thinkpad Helix2 which had been unable to start X since dwiic(4) started to attach on this machine in 2018. (I already saw the problem back then but never dug into it, and temporarily lost access to helix2 hardware for a long time.) With help from jcs@ who provided debugging hints already back in 2018. ok kettenis@
2021-11-05Newer i.MX device trees store the skew information in the PHY's node, whichPatrick Wildt
we can access through the phy-handle. If there's no reference, keep doing what we have been doing so far. ok kettenis@
2021-11-05Constify struct cfattach.Martin Pieuchot
2021-11-05Newer i.MX device trees retriee the USB phy using the more generic propertyPatrick Wildt
name "phys". To handle those, make sure that we look it up and in case it's not there fall back to "fsl,usbphy". ok kettenis@
2021-11-04revert rev 1.30 of ttm_bo_util.cJonathan Gray
Laurence Tratt reported firefox would hard lock a machine with polaris12 with the ttm change from linux 5.10.77. robert@ also hit the same problem.
2021-11-03drm/amdgpu: fix out of bounds writeJonathan Gray
From Thelford Williams eb3b6805e3e9d98b2507201fd061a231988ce623 in linux 5.10.y/5.10.77 5afa7898ab7a0ec9c28556a91df714bf3c2f725e in mainline linux
2021-11-03drm/ttm: fix memleak in ttm_transfered_destroyJonathan Gray
From Christian Koenig c21b4002214c1c7e7b627b9b53375612f7aab6db in linux 5.10.y/5.10.77 0db55f9a1bafbe3dac750ea669de9134922389b5 in mainline linux
2021-11-02Enable spleen16x32 and spleen32x64 on powerpc64 for GENERIC kernels.Frederic Cambus
Pointed out by Brad, thanks! OK kettenis@, deraadt@
2021-11-02Recognize BCM43436, as seen on the Raspberry Pi Zero 2 W.Patrick Wildt
ok jsg@
2021-11-02add handling for parity and character size config.David Gwynne
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@
2021-11-02knfTheo de Raadt
2021-11-01Enable spleen16x32 and spleen32x64 on riscv64 for GENERIC kernels.Frederic Cambus
OK deraadt@
2021-11-01Restore some NULL checks lost in r1.132, add a couple more to deal with WEP keyKenneth R Westerback
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@
2021-11-01use hw_power to implement power_supply_is_system_supplied()Jonathan Gray
2021-10-31Disable both TCP/UDP checksum offloading and VLAN HW tag offloading for now,Patrick Wildt
as we currently configure neither in the transmit code path. Found by sf@
2021-10-31Implement transmit and transmit completion path.Patrick Wildt
2021-10-31Extend the SPI bus API a bit. The config structure gets an sc_cs_delayMark Kettenis
member to allow us to specify a delay between assert the CS# signal and starting the clock. And the transfer function gains a flags argument, which can be used to specify a new SPI_KEEP_CS flag to keep CS# asserted after the transfer. This allows us to do another transfer immediately afterwards without de-asserting CS# which is necessary for sending commands to the upcoming Apple M1 keyboard/touchpad driver. ok patrick@
2021-10-31Move the fill and the tail pointer change to a later point, to make surePatrick Wildt
that the RDT is written, and that it is written not too early. Doing it before writing IGC_RXDCTL definitely doesn't work. The tail pointer needs to be set to the next empty slot, so it has to be "last desc filled + 1". Make sure sure that the rss mapping does not happen in the middle of the RX checksum block, and that it happens only if nqueues > 1. Also disable storing bad packets. With this, igc(4) receives packets just fine. ok kevlo@
2021-10-31Add igc(4), a driver for the Intel 2.5Gb Ethernet controllers.Patrick Wildt
Ported by kevlo@ ok jmatthew@
2021-10-31regenPatrick Wildt
2021-10-31Add another PCI id for Intel 2.5Gb adapters.Patrick Wildt
2021-10-31Make athn(4) attach to the Sony UWA-BR100. Patch by martingot@protonmailStefan Sperling
2021-10-31regenStefan Sperling
2021-10-31Add USB device ID for the Sony UWA-BR100. Patch by martingot@protonmailStefan Sperling
2021-10-31Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures.Stefan Sperling
Problem found and fix tested by krw@. ok krw@
2021-10-30Change hw.perfpolicy=auto by default, at startup. If the system has ACTheo de Raadt
power connected (default is yes when no driver differentiates) then default to 100% performance. On battery, use the existing auto algorithm (which is admittedly somewhat unrefined). This change overrides the system/BIOS speed and puts OpenBSD in control. As this happens very early during boot, besides speedups in all usage usage patterns, some surprises: unhibernate and sysupgrade times are cut in half. note: on a few architectures, the setperf fn pointer is changed late, and thus the auto algorithm stops timeing out. kettenis and i will look for a solution. in snaps for more than a week. ok kettenis
2021-10-30Fix build break caused by accidental keystroke during last commitAlexandre Ratchov
2021-10-30Disestablish softintrs upon detach (missed in last commit)Alexandre Ratchov
During detach, we can't rely on softintrs to signal processes blocked in read, write or poll, so we need to explicitely call wakeup functions in the detach method, as other drivers do.
2021-10-30Defer selwakeup() calls to a softintrAlexandre Ratchov
selwakeup() needs to be protected by KERNEL_LOCK, but we're not allowed to grab KERNEL_LOCK on interrupt context because midi runs at IPL_AUDIO with the audio_lock held. Furthermore, doing so is a locking order bug: syscall code-path grabs KERNEL_LOCK first while interrupt code-path does the opposite when calling selwakeup(). ok visa
2021-10-30Revert previous commit as it's causing panic when devices are detachedAlexandre Ratchov
ok sthen, anton
2021-10-30match on Intel 600 SeriesJonathan Gray
2021-10-30enable snooping on Intel 600 SeriesJonathan Gray
2021-10-30regenJonathan Gray