summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
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
2021-10-30add Intel 600 Series and Alder Lake S idsJonathan Gray
described in 648364-001 Intel 600 Series Chipset Family Platform Controller Hub Datasheet 655258-001 12th Generation Intel Core Processors Datasheet
2021-10-29A USB HID report ID must be represented using a single byte rangingAnton Lindqvist
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.
2021-10-29match more Prolific HXN idsJonathan Gray
tested by robert@ on PL2303GT ok deraadt@ robert@ patrick@
2021-10-29regenJonathan Gray
2021-10-29more Prolific HXN idsJonathan Gray
ok deraadt@ robert@ patrick@
2021-10-29Don't grab audio_lock in filt_midi{read,write} if NOTE_SUBMIT is set.Alexandre Ratchov
Fixes panics caused by attempts to grab audio_lock twice in the interrupt code path: once in the low-lever interrupt handler and once in selwakeup() This is exactly how audio(4) handles this problem. ok mpi
2021-10-28add proper declaration for addr in dt_prov_kprobe_hookJasper Lievisse Adriaanse
2021-10-27use db_get_probe_addr() instead of handrolling the expression wrapped in ifdefJasper Lievisse Adriaanse
ok mpi@
2021-10-27fix spello in commentJasper Lievisse Adriaanse
2021-10-26Add a new TEMPerHUM device id. style tweak deraadt@, ok mlarkin@Matthieu Herrb
2021-10-26Improve unhibernate performance (30% on some machines, another upcoming diffTheo de Raadt
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
2021-10-25remove dtp_mtx which protected dtp_ref; the code is always called with ↵Todd C. Miller
KERNEL_LOCK() held
2021-10-25remove dtp_mtx which protected dtp_ref; the code is always called with ↵Jasper Lievisse Adriaanse
KERNEL_LOCK() held discussed with and OK mpi@
2021-10-24For open/openat, if the flags parameter does not contain O_CREAT, theTheo de Raadt
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
2021-10-24Constify struct cfattach.Martin Pieuchot
ok visa@ a long time ago, ok patrick@
2021-10-24Remove crp_etype and return errors directly from crypto_invoke()Tobias Heider
ok patrick@
2021-10-24pretty & normalize the cfdriver declTheo de Raadt
2021-10-23tpm(4): add support for tpm2 CRB interfaceDave Voutila
Some modern tpm2 devices require or prefer drivers communicate via the CRB interface and not the TIS/fifo interface. This change adds basic support for detecting CRB start mode and using CRB to issue commands required for proper S4 hibernation. As a result, this also defines a new struct definition for the TPM2 acpi table required for start mode detection. This fixes recent S4 regressions on the Surface Go 2 caused by a change in firmware from Microsoft. Other CRB start methods may need implementing in the future to support additional hardware. tested by deraadt@ and many others, ok kettenis@
2021-10-23Retire asynchronous crypto API as it is no longer required by any driver andTobias Heider
adds unnecessary complexity. Dedicated crypto offloading devices are not common anymore. Modern CPU crypto acceleration works synchronously, eliminating the need for callbacks. Replace all occurrences of crypto_dispatch() with crypto_invoke(), which is blocking and only returns after the operation has completed or an error occured. Invoke callback functions directly from the consumer (e.g. IPsec, softraid) instead of relying on the crypto driver to call crypto_done(). ok bluhm@ mvs@ patrick@
2021-10-23Make sure we have enough space to add padding and final token to the nvramMark Kettenis
data. Also add the MAC address to the nvram data when there is a "local-mac-address" property in the device tree. This makes bwfm(4) work with the firmware/nvram/clm_blob files provided with MacOS on the Apple M1 Macs. ok patrick@
2021-10-22Mask LPI interrupts. This fixes an interrupt storm on dwge(4) variantsMark Kettenis
that support Energy Efficient Ethernet when connected to a switch that also supports Energy Effient Ethernet. For example on the odroid-hc4. ok patrick@
2021-10-22regenJonathan Gray
2021-10-22add Intel ADL-S and ADL-P graphics ids Mesa matchesJonathan Gray
fix a GMA600 id while here
2021-10-22Remove last dangling usage of CRYPTO_F_NOQUEUE.Anton Lindqvist
ok tb@
2021-10-22One could end up with the wrong encoding in xenocara while having a uccAnton Lindqvist
keyboard attached and /etc/kbdtype being present. The advertised encoding of a wsmux is a bit fragile as the last attached device will dictate it. If this happens to be a ucc keyboard, KB_US will always be the advertised encoding as its encoding is immutable and /etc/kbdtype is ignored. Instead, do not advertise the encoding for ucc devices when the parent mux queries its attached devices. However, asking the device directly (i.e. bypassing the mux) still returns the encoding as wsconsctl(8) would otherwise report an error. Thanks to landry@ for the report and testing.
2021-10-21regenJonathan Gray
2021-10-21add Gemini Lake MEI; from fkrJonathan Gray
2021-10-21Remove hifn(4), safe(4), and ubsec(4) crypto drivers. They requireAlexander Bluhm
the asynchronous crypto API which makes progress in MP difficult. The hardware is rarely available. They support only obsolete crypto algorithms. Scheduling crypto tasks via PCI is probably slower than the CPU, especailly as modern CPUs have their own accelerators.
2021-10-20drm/edid: In connector_bad_edid() cap num_of_ext by num_blocks readJonathan Gray
From Douglas Anderson a7b45024f66f9ec769e8dbb1a51ae83cd05929c7 in linux 5.10.y/5.10.75 97794170b696856483f74b47bfb6049780d2d3a0 in mainline linux
2021-10-17drm/amdgpu: fix gart.bo pin_count leakJonathan Gray
From Leslie Shi 621ddffb70db824eabd63d18ac635180fe9500f9 in linux 5.10.y/5.10.74 66805763a97f8f7bdf742fc0851d85c02ed9411f in mainline linux
2021-10-16Bail out early if the PCIe controller hasn't been initialized by theMark Kettenis
firmware. ok jsg@