summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2017-07-23Add sxitwi(4), a driver for the (i2c compatible) two-wire bus found onkettenis3-1/+626
several Allwinner SoCs. From Artturi Alm, based on code from NetBSD. Also add axppmic(4), a driver for the AXP209 i2c PMIC, which provides power down support. Written by Artturi Alm.
2017-07-23RK3288 support.kettenis1-17/+67
2017-07-23RK3288 support.kettenis1-4/+164
2017-07-23RK3288 support.kettenis1-2/+5
2017-07-23Add a few more RK3288 clocks.kettenis2-1/+14
2017-07-23Tweak timeouts a bit such that this works on the RK3288.kettenis1-5/+5
2017-07-23Prevent a possible "MAC context already removed" panic in iwm_auth().stsp1-6/+10
This panic happens if iwm_newstate_task() sleeps and wakes up after iwm_stop(). The error path of iwm_newstate_task() attempts to reset driver flags and firmware state, which should not be done if iwm_stop() has already done so. A more comprehensive fix for such races is being worked on but not ready yet. For now, check the generation counter in the error path of iwm_auth() and only clean up state if that counter hasn't changed. Problem reported and workaround tested by giovanni@
2017-07-23Add RK3288 support.kettenis2-3/+167
2017-07-22acpibat: look for _BIX first before falling back on _BIFjcs3-104/+204
ACPI 4.0 deprecated _BIF for battery status so some newer machines are exporting _BIX which extends _BIF's package with a few extra fields. When using _BIX, export the new discharge cycle count as a sensor. feedback from kettenis and anton ok deraadt
2017-07-22Add frame length range checks to the input path of iwm(4).stsp1-1/+10
No security benefit since the firmware has DMA access but we should not have such bad examples in our source tree. ok kevlo@
2017-07-22Introduce jiffies, a volatile unsigned long version of our ticks variablekettenis2-11/+8
for use by the linux compatibility APIs in drm(4). While I hate infecting code in sys/kern with this, untangling all the of having different types and different signedness is too much for me right now. The best strategy may be to change ticks itself to be long but that needs some careful auditing. ok deraadt@
2017-07-21Do not permit USB ioctl handler malloc(9)'s to block as this interferesians2-4/+10
with expected behavior. OK mpi@ patrick@
2017-07-21Show Synaptics Model IDs.bru1-3/+5
2017-07-21Replace MD _bus_dmamap_* function calls with MI onesmikeb2-9/+12
2017-07-21Add frame length boundary checks to the input path of atu(4).stsp1-3/+15
Problem found by Ilja Van Sprundel. ok kevlo
2017-07-21Unbreak the rsu(4) driver which was not kept up-to-date with recent WPAstsp1-4/+12
supplicant and net80211 state machine changes. While here, make rsu(4) report the correct channel for received frames to tcpdump(8). ok deraadt@
2017-07-21Fix frame length bounds checks in rsu(4).stsp1-5/+16
Due to signedness issues the existing checks didn't work as intended. Problem reported by Ilja Van Sprundel. ok deraadt@
2017-07-21Drop Rx'd frames larger than MCLBYTES.kevlo1-1/+6
Problem reported by Ilja Van Sprundel. ok stsp@, tb@
2017-07-20Make otus(4) drop frames larger than MCLBYTES.stsp1-1/+6
Problem reported by Ilja Van Sprundel. ok deraadt@ tb@
2017-07-20Start a list of isa(4) device names such that we can avoid printing themkettenis1-2/+9
as "not configured". ok mikeb@, millert@, deraadt@
2017-07-20Remove SIGIO support. Base tools do not implement it and ports relyingmpi1-26/+1
on libusbhid, generally via SDL, shouldn't do it either since it's not portable. Suggested by deraadt@ after Ilja van Sprundel reported an issue with a stale struct proc pointer in similar code. ok kettenis@, deraadt@
2017-07-20Enable RX aggregation, fix configuring custom MAC address and removempi1-11/+11
double reset sequence. From and tested by sc.dying at gmail on RTL8152 (ver 4c10) and RTL8153 (ver 5c20).
2017-07-19Remove SIGIO support. The audio(4) driver doesn't implement it either andkettenis2-19/+2
the preferred method to access MIDI hardware is through sndiod(8) which doesn't use it. Fixes a potential issue with a stale struct proc pointer found by Ilja van Sprundel. ok deraadt@, ratchov@
2017-07-19Implement drm_pci_alloc() and drm_pci_free() and use them to reduce thekettenis7-41/+53
diffs with Linux.
2017-07-19Implement the enter_ddb() "accessop" here as well.kettenis1-1/+17
2017-07-19Fix previous commit; check the enter_ddb function pointer instead of thekettenis1-2/+2
"accessops" pointer before calling it.
2017-07-19Turn this into a panic since there's no way to recover from itmikeb1-5/+6
2017-07-19Add a handler for RNDIS status messagesmikeb1-1/+39
RNDIS status messages may indicate various conditions reported by the hardware, including link status events. They're not supposed to be universally treated as errors. Issue reported by Artturi Alm, ok armani
2017-07-19Avoid additional div0 in case both ntracks & nsectors passed inderaadt1-2/+3
via ioctl are 0. Noticed by bluhm ok bluhm millert
2017-07-19Add a enter_ddb() "accessop" to wsdisplay(4) to allow KMS drivers to bypasskettenis3-2/+44
the modeset lock when entering ddb. This avoids triggering various asserts when the kernel panics while running X. ok deraadt@
2017-07-19Avoid division by zero of vnd_secsizederaadt1-1/+2
Found by Ilja Van Sprundel ok claudio kettenis
2017-07-19more depends gc / yacc rules overhaulespie1-7/+3
okay millert@
2017-07-19Check if mbuf cluster allocation succeeded and on failure free mbuf andclaudio1-1/+5
return ENOBUFS. Found by Ilja Van Sprundel OK bluhm@ deraadt@
2017-07-19Fix possible double free in the TX dma ring handling. If the allocation ofclaudio1-1/+2
the cluster fails in vte_init_tx_ring() the mbuf is removed but the slot in the ring still holds the pointer. A possible call to vte_stop() would then cause a double free. Again set pointer to NULL to prevent this. Found by Ilja Van Sprundel OK bluhm@
2017-07-18Prevent integer overflow in WSDISPLAYIO_LDFONT ioctl.kettenis1-1/+5
Issue found by Ilja van Sprundel. ok deraadt@
2017-07-18Remove stray whitespace.kettenis1-1/+0
2017-07-18Fixup the printf string, spacingmikeb1-3/+2
2017-07-18fix previous to make sxiccmu compile againjsg1-2/+2
2017-07-17The Linux kernel device trees use "allwinner,sun50i-h5-ccu" as the compatiblekettenis1-7/+9
propert for the clock controller module. Prepare for the day when the u-boot device trees get update.
2017-07-17Implement a proper hash table instead of lumping evrything into a singlekettenis1-10/+37
list.
2017-07-17Forbid overwriting a grant table entry currently in usemikeb1-1/+6
2017-07-17Reduce amount of CAS attempts in a busy-wait loop by a factor of 100mikeb1-2/+2
2017-07-17Pick the correct TX buffer when unrollingmikeb1-2/+2
2017-07-17Reimplement mbuf/map to descriptor mappingmikeb1-73/+97
Previously descriptors have referenced DMA maps too loosely which led to bus_dmamap_unload being called before all fragments have been completed. This eliminates the last instance of excessive looping while waiting for a grant table entry to become available.
2017-07-17Make athn(4) send RTS frames at 2 Mbit/s again. I changed this to 1 Mbit/sstsp1-2/+2
in r1.38 of this file, however for some reason the hardware sends RTS frames at rates other than 1 Mbit/s which of course doesn't help. Not sure what is causing this problem, but the old behaviour worked better, so revert. ok krw@
2017-07-17Grant table entries must be disassociated once CCB is completemikeb1-13/+14
Attempting to unload the map before all chunks are done may lead to unnecessary looping.
2017-07-16Fix missing splx() in iwm_newstate_task(). Bug introduced 2 hours ago in r1.200.stsp1-2/+4
2017-07-16Add comments to the definitions of iwm(4) driver-private flags.stsp1-7/+7
2017-07-16Remove the AP from iwm's firmware station table when moving out of AUTH state.stsp1-1/+11
Fixes "could not remove MAC context" errors seen during AUTH->SCAN transitions.
2017-07-16Some net80211 state changes are triggered by incoming frames, and it isstsp1-8/+9
possible for such frames to move iwm(4) to the same state, e.g. AUTH->AUTH. Do not bother the firmware with such no-op state changes because that runs a high risk of hitting firmware errors. Problem reported by Gregor Best.