summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic
AgeCommit message (Collapse)AuthorFilesLines
2020-06-22use ifiq_input and use it's return value to apply backpressure to rxrs.dlg5-12/+19
this is a step toward deprecating softclock based livelock detection.
2020-06-19Add support for BCM4359 SDIO variants such as the AP6359SA module foundkettenis1-2/+7
on the RockPro64 WiFi module. Note that there is no fiirmware for this chip in the bwfm-firmware package at the moment. ok patrick@
2020-06-19Whitespace.krw1-2/+2
2020-06-19Whitespace. Two short lines to one line.krw2-14/+13
2020-06-11Make use of hardware crypto for CCMP. The tricky bits had been lyingjmatthew2-5/+23
dormant in the driver for years, we just needed to insert the IV before transmission and do packet number checks on received frames. tested by kevlo@ solene@ benno@ and me on a variety of hardware ok kevlo@ stsp@
2020-06-08update drm to linux 5.7jsg5-90/+104
adds kernel support for amdgpu: vega20, raven2, renoir, navi10, navi14 inteldrm: icelake, tigerlake Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping, patrick@ for helping adapt rockchip drm and many developers for testing.
2020-05-29dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt1-3/+1
conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
2020-05-25change wsdisplay attribute type from long to uint32_tjsg4-34/+34
miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
2020-05-25rename wsdisplay alloc_attr() to pack_attr()jsg2-12/+12
Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
2020-05-23Fix typo in a comment that originated in wpi(4) and has spread elsewhere.stsp1-2/+2
2020-05-17restore VGA fonts on VT switchjsg1-1/+2
Avoids an unusable screen when switching to a VT with a custom VGA font from X. While it is possible to modify the xserver to invoke an ioctl for this kettenis@ points out the xserver may have crashed so doing it in the kernel is preferred. Problem reported by and patch from John Carmack. Changed slightly to do the vga_restore_fonts() (write to video memory) call before vga_setfont() (pointing the character generator at it) at the suggestion of kettenis@. ok kettenis@
2020-05-16Don't attempt to reset the state of the flip-flop associated with thejsg1-7/+1
vga attribute controller index or set the enable/'palette address source' bit when saving and restoring 256 colour vga palette with 0x3c6-0x3c9 as this does not touch the attribute registers. When this code was ported from FreeBSD in vga.c rev 1.48 the flip-flop reset parts were mistakenly made to read 0x3ca instead of 0x3da. Fixes a problem with VirtualBox where the text mode background was a dim red colour instead of black after VT switch. Problem reported by and patch from John Carmack. ok matthieu@ who notes this also fixes a similiar problem with a KVM / virt-manager virtual machine.
2020-05-15Fix CCMP replay check with 11n Rx aggregation and CCMP hardware offloading.stsp1-55/+9
So far, drivers using hardware CCMP decryption were expected to keep the most recently seen CCMP packet number (PN) up-to-date, and to discard frames with lower PNs as replays. A-MPDU subframes may legitimately arrive out of order, and the drivers skipped CCMP replay checking for such frames. Re-ordering happens in ieee80211_inputm(), after the driver is done with a frame. Drivers cannot tell replayed frames apart from legitimate out-of-order retransmissions. To fix this, update the PN value in ieee80211_inputm() after subframes have been reordered into their proper sequence. Drivers still perform replay checks but they no longer have to worry about updating the last seen PN value. The 802.11 spec confirms that replay checking is supposed to happen after A-MPDU re-ordering. Tested by jmc@, benno@, solene@, and myself with the following drivers: athn(4), iwn(4), iwm(4), wpi(4), urtwn(4) ok solene@
2020-05-15Some newer bwfm(4) chips from Cypress hold their regulatorypatrick3-3/+67
constraints in a separate blob, instead of in the firmware. This .clm_blob needs to be loaded as well.
2020-04-30Fix use of uninitialized 'wh' variable in error path of ar5008_rx_process().stsp1-6/+4
This fix simplifies HW decrytion error checking: Frame header contents aren't relevant because we are going to drop frames that had errors in any case. I made a mistake by trying to add an exception for multicast frames at this point. Frame header contents might not even be valid. This problem was introduced with CCMP hardware offload support and detected by Coverity (CID 1492755). ok mestre@ kevlo@
2020-04-29Add the 'nomimo' nwflag which disables MIMO in 11n mode.stsp1-38/+51
This flag restricts a wireless driver to MCS0 - MCS7 for both transmission and reception. It can be set to work around packet loss in 11n mode caused by unused antenna connectors on a MIMO-capable wireless network device. man page tweak from tracey@ ok deraadt@
2020-04-28Configure Tx interrupt mitigation thresholds on athn(4) devices.stsp2-2/+12
ok kevlo@ mpi@
2020-04-27Offload CCMP (WPA2) encryption and decryption to athn(4) hardware.stsp3-91/+234
This reduces CPU load during traffic bursts, which is especially noticeable on boards with relatively slow CPUs such as Alix and APU. For reference, my rcc-ve boards (Intel Atom C2558) now forward ~2000pps between Ethernet and wifi with <= 1% CPU interrupt time according to systat. Beforehand, these boards became noticeably less responsive with fairly high interrupt and spin %. CCMP offload is used on both PCI and USB devices (thanks kevlo@ for catching my omission of USB devices in the first iteration of this change!) Tested by (at least) Kevin Chadwick, tracey@, kevlo@, kili@, Ted Patterson, David Dahlberg, and Scott Bennett. ok tracey@ kevlo@
2020-04-21Revert r1.207. Apparently mpi(4) on sparc64 blows up ifkrw1-6/+7
sc_link.openings is greater than 34. Encountered by Sigi Rudzio on his Blade 2500, who kindly did some testing to discover that the answer is 34, not 42. Nuke some whitespace on the way by.
2020-04-21Add bcmdmac, a driver for the DMA controller found on BCM283x SoCs.tobhe1-0/+126
Original work by Neil Ashford and dlg@ ok kettenis@
2020-04-20Add athn(4) definitions for the block-ack/block-ack-request control register.stsp1-1/+10
Not used yet but may become useful later.
2020-04-19Add bcmmbox, a driver for the VideoCore messagebox interface on BCM283X.tobhe2-0/+509
Original work by Neil Ashford and dlg@ Feedback from jsg@ ok kettenis@, dlg@
2020-04-15wdsc(4), ncr53c9x: timestamp LUNs with time_uptime(9), not time_second(9)cheloha2-6/+6
Use a monotonic clock for timestamping LUNs to avoid problems when the UTC clock jumps. ok krw@
2020-04-14Add bse(4), a driver for the Broadcom GENET v5 network interface found onkettenis3-0/+1278
the Raspberry Pi4. ok patrick@
2020-04-06wi(4): tsleep(9) -> tsleep_nsec(9); ok stsp@cheloha1-3/+3
2020-03-21Simplify some goto'ing that jumps a single line orkrw1-12/+6
does nothing at all. The first one spotted as CID 1452976. Reads good to millert@ ok mpi@
2020-03-16Actually attach panel (if we have one).kettenis1-1/+7
ok patrick@
2020-03-16Replace video "framework" with a more generic port/endpoint "framework".kettenis1-1/+4
This also adds panel support to rkanxdp(4). Code to hook up simplepanel(4) is still missing and will come later. ok patrick@
2020-03-15sparc64 issue being identified and removed, reapply r1.73:krw2-5/+16
"Bump nvme(4) max physio() i/o size to 128K"
2020-03-15Revert nvme back to last working commit for sparc64.kmos2-17/+9
The coverity-related diff breaks sparc64's ability to read the disk. ok deraadt
2020-03-14ahci_get_pmp_ccb() returns a non-NULL pointer, fails akrw1-14/+6
KASSERT(), or has already blown up by dereferencing the pointer. Two of the four invocations of ahci_get_pmp_ccb() check for NULL. Save a couple of bytes by not bothering. Add comments to the invocations to docuement the assumption.
2020-03-14Trailing whitespace, long lines, incorrect function names inkrw1-13/+14
printf()'s.
2020-03-13Recognize BCM43341 as a BCM43340 variant.patrick1-1/+2
From Rob Schmersel
2020-03-13Bump nvme(4) max physio() i/o size to 128K.krw2-5/+16
2020-03-10Variables 'nowait' amd 'flags' should have died in 2008 with r1.36'skrw1-10/+3
removal of internal queuing of scsi_xfer's. Put them out of their misery. Nuke an obsolete comment in passing. CID 1453357.
2020-03-10Coverity points out (12 + MAXMPS) can never be less thankrw1-5/+2
12. PAGE_SHIFT is 12 (a.k.a. PAGE_SIZE == 4096) or more on OpenBSD architectures. So remove some dead code by unconditionally setting sc_mps (memory page size) to 1 << PAGE_SHIFT. CID 1491655. No functional change.
2020-03-10Ooops. Need both files.krw1-2/+2
sgl (scatter gather list) and prpl (physical region page list) are two different things in the NVMe world. Only the latter is currently implemented in nvme(4) so rename sc_max_sgl to sc_max_prpl to reflect this. No functional change.
2020-03-10sgl (scatter gather list) and prpl (physical region page list) are twokrw1-8/+8
different things in the NVMe world. Only the latter is currently implemented in nvme(4) so rename sc_max_sgl to sc_max_prpl to reflect this. No functional change.
2020-03-09Update the console device always when attaching the real deviceyasuoka1-3/+3
driver. The information by the driver is supposed more reliable than the information which was set up earlier. ok patrick
2020-03-06Process the NVRAM in bwfm(4) itself. So far we have relied on somepatrick2-2/+52
external tool to pre-process the NVRAM, even though it's simple to do ourselves. This allows easier firmware distribution. ok kurt@
2020-03-04fix typo in previouscheloha1-2/+2
2020-03-04Restrict modes to those with an actually supported pixel clock.kettenis2-8/+18
ok patrick@
2020-03-02Shuffle logic a bit to make sizes/limits more obvious.krw1-14/+12
No functional change.
2020-03-02Add rkdwhdmi(4), a driver for the HDMI transmitter found on the Rockchipkettenis3-0/+1436
RK3399 SoC. ok patrick@
2020-03-01Use ffs() on sc_mps, removing need for sc_mps_bits. Replace ffs(64)-1krw2-6/+5
and ffs(16)-1 with the constant results (i.e. 6 and 4). Add comments to clarify use of these constants. Net result, one less invocation of ffs(), softc smaller by one u_int, and less potential confusion over 'mps'. No functional change.
2020-02-28nvme_enable() doesn't need parameters for both sc and sc->sc_mps_bits.krw1-6/+6
Nuke the latter and use the former to get the same value.
2020-02-27Trailing whitespace.krw1-7/+7
2020-02-25Make bwfm(4) call if_input() only once per interrupt.patrick2-14/+12
This reduces drops caused by the ifq pressure drop mechanism and hence increases throughput. ok tobhe@
2020-02-25pcic(4): i82365.c: tsleep(9) -> tsleep_nsec(9)cheloha1-3/+3
Yet another straightforward ticks-to-milliseconds conversion. I am honestly unsure what particular driver this file belongs to. It seems to be related to pcic(4) and/or pcmcia(4) so I've marked this diff with pcic(4) in the summary line. No complaints on tech@ after six weeks.
2020-02-21Add anxdp(4), a driver for the Analogix Display Port controller,patrick2-0/+949
which amongst other things sets up the link and allows reading the display's modelines over I2C. Taken from NetBSD and adjusted to our layers. ok kettenis@