summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for the UART found on the Apple M1 SoC.kettenis2021-02-162-10/+30
| | | | ok patrick@
* Introduce debug levels since the current debug output is too noisy bymglocker2021-02-161-17/+18
| | | | default.
* Poll battery sensors less frequently. The previous period was quiteanton2021-02-161-2/+2
| | | | arbitrary and inspired by other USB drivers.
* Trim uhidpp_device_features() by extracting two pure protocol functions.anton2021-02-161-18/+52
|
* Enable multiple opens of a video(4) device as described in the V4L2mglocker2021-02-161-30/+109
| | | | | | | | | | | | | | | | | | | | | | | specification: https://www.kernel.org/doc/html/v5.10/userspace-api/media/v4l/open.html#f1 The discussion has been started by jca@, who has implemented this behavior recently, but limited to the same process. This diff extends this behavior to any process. The first process which opens a stream will become the device owner. Other processes are still allowed to call certain ioctls, but none which are related to the start/stop of a stream, or manipulation of the streaming buffers. At the moment only VIDIOC_G_CTRL and VIDIOC_S_CTRL are supported to be called by non- device owner processes, which should be extended further in the future. There is no additional kernel locking implemented at the moment, since video(4) already runs under the KERNEL_LOCK(), which we expect to be sufficient for now (as discussed with claudio@). A lot of improvement input received from anton@. ok anton@
* Introduce BUS_SPACE_MAP_POSTED such that we can distinguish betweenkettenis2021-02-168-31/+43
| | | | | | | | posted and non-posted device memory mappings and set the right memory attributes for them. Needed because on the Apple M1 using the wrong mapping will fault. ok patrick@, dlg@
* Comments & style cleanup, no functional change intended.mpi2021-02-161-224/+284
| | | | | | | | | | | | - Sync comments with NetBSD including locking details. - Remove superfluous parenthesis and spaces. - Add brackets, even if questionable, to reduce diff with NetBSD - Use for (;;) instead of while(1) - Rename a variable from 'result' into 'error'. - Move uvm_fault() and uvm_fault_upper_lookup() - Add an locking assert in uvm_fault_upper_lookup() ok tb@, mlarkin@
* use rtalloc_mpath in pf_route and pf_route6.dlg2021-02-161-3/+4
| | | | | | | if you have multiple links to the same destination, this will let you use them with route-to/reply-to/dup-to. ok claudio@
* some phy are not needed anymore since the ethernet drivers went awayderaadt2021-02-161-6/+6
|
* While it should be possible to use "normal uncachable" mappings forkettenis2021-02-151-1/+2
| | | | | | | | write-combining on arm64 as Linux does, this doesn't seem to work on NXP's LX2160A SoC. So switch to using "device" mappings for now to make amdgpu(4) work better. ok patrick@
* Simplify error path in in route_attach(). We always call it in threadmvs2021-02-151-10/+4
| | | | | | | context so we always have `curproc' Also protocol control block is not required for soreserve() so we can do it before `rop' allocation. ok bluhm@
* Fix double unlock in uvmfault_anonget().mpi2021-02-151-3/+3
| | | | Reported by and ok jsg@
* Back-out USB data toggle fix for HID devices, since we received multiplemglocker2021-02-151-43/+1
| | | | | | reports about broken devices, e.g. for ukbd(4) and fido(4). ok mpi@
* Move single_thread_set() out of KERNEL_LOCK().mpi2021-02-154-12/+10
| | | | | | | Use the SCHED_LOCK() to ensure `ps_thread' isn't being modified by a sibling when entering tsleep(9) w/o KERNEL_LOCK(). ok visa@
* move the rearming of the cq after the refill of the rq.dlg2021-02-151-4/+5
| | | | | | | | this is the only real diff we have left outstanding on a box that experienced rx lockups. since adding this change it's been happy for the last 4 weeks and counting so far. ok jmatthew@
* Enable clocks and adjust for removal of subnodes in upstream Linuxkettenis2021-02-141-2/+4
| | | | device trees.
* Enable clocks.kettenis2021-02-141-1/+4
|
* Raise match priority to beat syscon(4).kettenis2021-02-141-39/+81
| | | | | | | Use the right clock for the Cortex-A7 cores. Support CPU clocks and remove exclock_cpuspeed(). ok patrick@
* regenkettenis2021-02-142-2/+12
|
* Add a few more devices that show up on the Apple M1 mini.kettenis2021-02-141-1/+3
| | | | ok patrick@, deraadt@
* Postpone installation of the periodic sensor task until at least oneanton2021-02-141-2/+4
| | | | device has connected.
* Bail out earlier during attach if no devices are paired with theanton2021-02-141-4/+7
| | | | receiver.
* Enumerate all features supported by a device on connect.anton2021-02-141-6/+93
| | | | Should help diagnose various reports regarding missing battery sensors.
* Introduce variables to deal with bit layout differences in the UFSTATkettenis2021-02-141-9/+26
| | | | | | | | | register. Use 32-bit reads and writes to access the URXH and UTXH registers. They're documented as 32-bit registers in the Exynos 4 and Exynos 5 User Manuals and accessing URXH with an 8-bit read triggers a fault on Apple's M1 SoC. ok patrick@
* Recent device trees have the syscon-reboot and syscon-poweroff nodes askettenis2021-02-142-11/+22
| | | | | | | children of the node claimed by expower(4). That node also fained a "syscon" compatible in the process. Deal with these changes, ok patrick@
* correct drm work flush behaviourjsg2021-02-142-6/+10
| | | | | | | | | Don't set taskq to system_wq in INIT_WORK(). Test if taskq pointer is non-NULL before calling taskq_barrier() in flush functions. fixes a black screen on boot problem with 5.10.y drm using nano x1 bisected by jcs@ to 'drm/i915: Always flush the active worker before returning from the wait'
* Revise cnmac(4)'s address filter setupvisa2021-02-134-114/+47
| | | | | | | | | Set up the DMAC filter in one go instead of doing it separately for unicast and multicast DMACs. This attempts to make the code a little more readable. The setup should now run a bit faster as well because it now does fewer register accesses. Tested on CN5020, CN6120 and CN7130.
* Fix a commentmlarkin2021-02-131-2/+2
|
* Remove trailing whitespacemlarkin2021-02-131-14/+14
| | | | No code/functional change
* Remove trailing whitespacemlarkin2021-02-131-6/+6
| | | | No code/functional change
* pf_remove_divert_state() is an entry point into pf, modifying the pf statepatrick2021-02-121-1/+7
| | | | | | | table. Hence we have to grab both the pf lock and the pf state lock. Found by dlg@ ok bluhm@ sashan@
* Fix null pointer dereference in pf_route6(). Embedding scope intobluhm2021-02-121-3/+1
| | | | | | addresses that come from pf cannot be right, so remove the code. Coverity CID 1501718 OK dlg@ claudio@
* Call exuart(4) early attach on arm64.patrick2021-02-111-1/+3
| | | | ok kettenis@
* Enable exuart(4).patrick2021-02-112-2/+8
| | | | ok kettenis@
* Don't hardcode com(4)'s major number in exuart(4).patrick2021-02-111-5/+12
| | | | ok kettenis@
* sbdrop(): use NULL instead of 0 in pointer assignmentmvs2021-02-111-2/+2
| | | | ok bluhm@
* We link `ifp' to `if_list' before we perform if_attachsetup(). It is notmvs2021-02-111-3/+2
| | | | | | | | | fully initialized because we initialize `if_groups' after linking. It's not triggered because if_attach() and if_unit(9) are serialized by kernel lock and `ifp' is often filled by nulls. Move `if_groups' initialization to if_attach_common() to prevent this. ok bluhm@ claudio@ deraadt@
* Add missing break in switch statement of rge_activate().stsp2021-02-111-1/+2
| | | | | | | CID 1501716 ok kevlo@ and mestre@ had the same diff
* Leave out gp initialization from kernel entry on mips64visa2021-02-119-24/+8
| | | | | | | | | On OpenBSD/mips64, the kernel is compiled with -mno-abicalls. This disables gp-relative addressing and essentially makes gp a spare register in the kernel. Hence it is unnecessary to initialize gp when entering the kernel. The _gp symbol is not needed either. Suggested by miod@
* "proc: table is full" actually means thread table is full; ok mpi@ sthen@otto2021-02-111-2/+2
|
* In the various open functions reduce the fdplock() to only span over theclaudio2021-02-111-16/+27
| | | | | | | function which need the lock (falloc, fdinsert, fdremove). In most cases it is not correct to hold the lock while calling VFS functions or e.g. closef since those aquire or release long lived VFS locks. OK visa@ mvs@
* Initialize var since it's used in a condition a little bit afterwards.mestre2021-02-111-2/+2
| | | | | | CID 1501713 ok jmatthew@
* Initialize the stack local device id variable correctly.anton2021-02-111-2/+2
| | | | CID 1501705
* Swap faddr/laddr and fport/lport arguments in call to stoeplitz_ipXport().patrick2021-02-112-6/+6
| | | | | | | | | Technically the whole point of the stoeplitz API is that it's symmetric, meaning that the order of addresses and ports doesn't matter and will produce the same hash value. Coverity CID 1501717 ok dlg@
* Make room for handling of HID++ 1.0 devices. No functional change.anton2021-02-111-56/+69
|
* Use idx suffix consistently.anton2021-02-111-17/+17
|
* Remove unused software id macro.anton2021-02-111-2/+1
|
* Fold long line.anton2021-02-111-2/+3
|
* Stop uhidpp from claiming all report ids, instead only claim theanton2021-02-111-5/+22
| | | | | | | | | | | necessary ones. Solves a regression introduced with the arrival of uhidpp causing some Logitech HID devices from attaching to its appropriate driver. Thanks to <naszy at poczta dot fm> and Peter Kane <pwkane at gmail dot com> for reporting and trying out diffs. ok mglocker@
* Add uhidev_unset_report_dev(), doing the opposite ofanton2021-02-112-2/+13
| | | | | | uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp. ok mglocker@