summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
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-15unifdef __OpenBSD__Jonathan Gray
2022-01-14update drm to linux 5.15.14Jonathan Gray
new hardware support includes Intel ehl/Elkhart Lake (embedded) jsl/Jasper Lake (atom) rkl/Rocket Lake (desktop) AMD van gogh APU (gfx1033) yellow carp / rembrandt APU (gfx1035?) Ryzen 6000 APU navy flounder / navi 22 (gfx1031) RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT dimgrey cavefish / navi 23 (gfx1032) Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M, RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S beige goby / navi 24 (gfx1034) RX 6500 XT, RX 6400, RX 6500M, RX 6300M Thanks to the OpenBSD Foundation for sponsoring this work niklas@ for helping with ttm and amdgpu and patrick@ for adapting rockchip drm.
2022-01-11add Synopsys Degisnware UART (dw-apb-uart) supportSASANO Takayoshi
To fix Allwinner H6's UART problem, need to add dw-apb-uart special code. ok kettenis@
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2022-01-07fix aac build after -Wno-uninitialized was removedJonathan Gray
2022-01-05rename ETHERTYPE_PAE to ETHERTYPE_EAPOL.David Gwynne
everyone else seems to use ETHERTYPE_EAPOL, and as a bonus it also appears to be more correct. ok deraadt@ stsp@
2022-01-04remove the last part of driver for aic-6250 scsi on aviionJonathan Gray
2022-01-04remove files missed when sgi was removedJonathan Gray
ok visa@
2022-01-03the prism54 domain is long abandonedJonathan Gray
don't give any traffic to whoever registered it afterwards ok claudio@ stsp@
2021-12-27Support reading OTP information from a few more chips, necessary to learnPatrick Wildt
firmare names on Apple M1 Pro/Max and Apple T2 Macs.
2021-12-27Fix off-by-one in blob download, where in the case that the blob is evenlyPatrick Wildt
divisible by 1400, the last chunk isn't marked with an end flag. ok tobhe@
2021-12-27BCM4387 needs the D11 cores to be held in reset by us, the firmwarePatrick Wildt
will take care of releasing them, as otherwise initialization would fail some of the time. That chip also contains 3 of these, so make sure we reset all of them. Necessary on Apple M1 Pro/Max.
2021-12-27Send TxCap and WiFi calibration blobs to the chip.Patrick Wildt
2021-12-27Handle trailing odd-sized 1024 byte blocks when calculating TCM RAM size.Patrick Wildt
2021-12-26Add information about TCM rambase and how to check the SR capability forPatrick Wildt
a few more chips.
2021-12-22Disable minimum power consumption in hostap mode. This improves connectionTobias Heider
reliability when bwfm is used as an access point. ok patrick@
2021-12-20bus_dmamem_unmap() should not be called from interrupt context, so freePatrick Wildt
and close flowrings using bwfm_do_async(). Reported by and ok kettenis@
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-11-23avoid clang -Wsometimes-uninitialized warnings in fms(4)Jonathan Gray
feedback and ok millert@
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-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-11Add support for 40MHz channels to net80211 RA.Stefan Sperling
For the moment we use either the 40MHz rate set or the 20 MHz one, depending on whether our peer supports 40MHz channels. If this turns out to be suboptimal we could probe the 40MHz and 20MHz rate sets separately to detect which one works better. The same applies to use of the short guard interval (SGI), which is either always on or off at the moment. Again, probing for this could be added later if needed.
2021-10-03Apparently some athn(4) variants are buggy and may hand us corrupt framesMark Kettenis
that are marked "ok". Linux has some workarounds for this and checks whether the status word has error bits set in it regardless of the bit that marks the frame as "ok". Adapt this workaround to our driver and drop the frame after setting input errors. This doesn't filter out all corrupted frames, but it does keep things down to a level where it doesn't fill up the node cache anymore when athn(4) is used in hostap mode. Seen with: athn0 at pci1 dev 0 function 0 "Atheros AR9281" rev 0x01: intx athn0: AR9280 rev 2 (2T2R), ROM rev 16, address xx:xx:xx:xx:xx:xx ok stsp@
2021-09-01Use ttopen in tty drivers open functions as ttysleep string, as the others do.Jan Klemkow
ok patrick@
2021-09-01Remove dead poweroff functions, as they not appear in otherJan Klemkow
serial drivers. ok patrick@
2021-08-31Implement suspend/resume for bwfm(4) with PCIe backend. We try to send thePatrick Wildt
device into D3 and do a hot-resume if possible. Otherwise we need to clean up the resources to allow complete HW re-initialization to take place.
2021-08-31Clean up the list of chips upon detach and mark us uninitialized.Patrick Wildt
2021-08-31Using suser() instead of doing it manually.Jan Klemkow
ok patrick@
2021-08-31sprinkle barriers and dmamem_syncs around the hibernate io path.David Gwynne
at the very least it stops the compiler omgoptimising away important code. tested by and ok deraadt@ jmatthew@
2021-08-30remove a bunch of forward-only structs that were found with ctfconv.Jasper Lievisse Adriaanse
ok mpi@
2021-08-29Reduce the number of openings for aplns(4) to 1. This isn't correct butMark Kettenis
make NVMe on the Apple M1 stable. Hopefully we can figure out the real issue in the future. ok jmatthew@
2021-08-29Reduce the number of openings for aplns(4) to 1. This isn't correct butMark Kettenis
make NVMe on the Apple M1 stable. Hopefully we can figure out the real issue in the future. ok jmatthew@
2021-08-19Purge the cached nodes when we switch back to SCAN. In case we lostPatrick Wildt
the connection because an AP is gone away, this makes sure we don't end up picking a now non-existant AP over and over. Another problem this works around is that when trying to re-join that AP, the attempt to connect would not yield any event message from the firmware, and then we would get stuck. Since we now definitely choose a different AP, this issue does not show up. ok stsp@
2021-08-19Consistently use ieee80211_begin_scan() to switch to SCAN.Patrick Wildt
React to deauth/disassoc and link state events if we're already past the SCAN stage. ok stsp@
2021-08-19Fix an off-by-one in bwfm(4) SSID length checks.Stefan Sperling
SSIDs are binary data, not NUL-terminated strings. ok patrick@
2021-08-12One some access points we receive an unsolicited assoc status eventPatrick Wildt
directly after having successfully associated. In that case we should ignore the message, because otherwise we re-scan, re-associate and then get stuck in a loop. Ignoring the unsolicited assoc status even leads to a successful connection. Found by and ok gerhard@
2021-07-14fix "logically dead code" flagged by coverityDaniel Dickman
It looks like twe was refactored in 2011 and one error check was missed. While the device may no longer be widely used, this helps reduce the coverity alert count. CID 1453371 ok krw@
2021-07-13Ensure that we don't overrun the TX FIFO for longer transfers. CheckPatrick Wildt
the limit after every character, and wait for the FIFO to empty before sending out more bytes. With this I can now use ipmitool(1) to change IPMI passwords on the Ampere eMAG. ok kettenis@
2021-07-08fix the hibernate io path.David Gwynne
a botched merge meant i was posting the previously used slot to the chip to process before posting the current slot. ok deraadt@
2021-07-07update drm to linux 5.10.47Jonathan Gray
hardware support changes include inteldrm: better support for tiger lake amdgpu: support for navi12, navi21 "sienna_cichlid", arcturus amdgpu: support for cezanne "green sardine" ryzen 5000 apu Thanks to the OpenBSD Foundation for sponsoring this work, patrick@ for helping adapt rockchip drm, kettenis@ and mpi@ for uvm discussions and various testers.
2021-07-01Prevent athn(4) from calling ieee80211_find_rxnode() on bad frames.Stefan Sperling
This fixes an issue introduced with our workaround for bogus michael mic failures seen when hardware receives control frames. We do need to ignore the michael mic failure in this case but we should not call ieee80211_find_rxnode() on such frames unconditionally. Do this only if the transmitter's address has already been cached. When ieee80211_find_rxnode() is called with an unknown source MAC address it will create a new entry in the node cache. Frames flagged as incorrectly received by hardware should not be passed to ieee80211_find_rxnode() without further verification to avoid creating bogus cache entries based on corrupt frame headers. Prompted by an issue seen by kettenis@ on arm64 where the node cache contains bogus entries. This change doesn't fix the issue but it is a step in the right direction regardless since it fixes one possible cause for the issue. ok kettenis@ tested by myself and Mikolaj Kucharski
2021-06-02Correctly calculate number of PRPL entries we have to sync by addingPatrick Wildt
brackets to manage operator precedence. Otherwise we'd attempt to sync more than needed, which doesn't cause issues, but it's still wrong. ok dlg@ jmatthew@
2021-05-31make nvme_read8 and write8 less clever.David Gwynne
hopefully big endian still works.
2021-05-31try to get rid of a weird comma on the alpns attach line.David Gwynne
"makes sense" jmatthew@
2021-05-30Include <sys/mutex.h> to avoid a hidden header dependency.Visa Hankala
OK jsg@ deraadt@
2021-05-29Only allocate the "hibernate" queue when HIBERNATE support is being built.Mark Kettenis
This makes the NVMe storage on the Apple M1 machines actually work! ok patrick@, dlg@
2021-05-28aplns needs some dmamem per queue for it's iommu.David Gwynne
2021-05-28provide nvme_ops for vanilla pci nvme, and use them in the right places.David Gwynne
this paves the way for supporting the apple nvme storage controllers. hopefully most of the remaining work on that is in the bus glue for those controllers and this code won't need more tweaks. hibernate still works, but it's relying on luck at the moment. hibernate on arm64 and the apple controllers in particular will almost certainly require more work here. ok jmatthew@
2021-05-28provide an nvme_ops struct to start trying to support apple m1 nvme.David Gwynne
the Apple NVME Storage (ans) controller is almost but not quite a vanilla nvme controller. one difference is that it doesnt attach to a pci bus, so it will need custom bus glue to attach on those machines. the other differences are around command submission. vanilla nvme command submission is done via rings where the host fills in one or more entries on the ring and then posts where the ring is up to in a doorbell. ans nvme command submission is done via an array of command slots where the host picks a slot and then posts every slot number it fills in to a doorbell instead. this is kind of clever because once a command slot is allocated, you don't need any coordination between multiple cpus using that array of slots to fill in and post the entry they were allocated. on the other hand, it's different, so the code needs to be specialised. ans also seems to have some weird iommu thing that needs to be maintained as commands are posted and completed. the nvme_ops struct will allow vanilla and ans controllers to provide their own backens for these different semantics. ok jmatthew@