summaryrefslogtreecommitdiffstats
path: root/sys/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* The firmware replaces the last 32-bit on RAM with a shared DRAM address.patrick2021-02-251-2/+8
| | | | | | | While the for-loop checks that thie value has changed since we wrote to it, the timeout-condition checked for non-zero, which is wrong. This means that we didn't realize the firmware wasn't started. While there, make sure the shared DRAM address is inside the chip's address space.
* Some newer chips have two D11/802.11 cores, and we need to reset both atpatrick2021-02-252-5/+38
| | | | the same time.
* Support for version 7 of the bwfm(4) PCIe interface. The size of the itemspatrick2021-02-252-5/+7
| | | | | on the rx/tx complete rings has increased slightly to accomodate possible new features.
* Add some infrastructure in the PCI chipset tag for pci_probe_device_hook()patrick2021-02-254-4/+36
| | | | | | so that we can provide IOMMU-hooked bus DMA tags for each PCI device. ok kettenis@
* Add a framework for IOMMUs.kettenis2021-02-252-2/+108
| | | | ok patrick@
* Prevent zero size devices from attachingjan2021-02-251-6/+11
| | | | | | This also fixes two NULL ptr derefs in later code path. OK patick@, krw@
* we don't have to cast to caddr_t when calling m_copydata anymore.dlg2021-02-2512-36/+35
| | | | | | | | | | | | | | | | the first cut of this diff was made with coccinelle using this spatch: @rule@ type caddr_t; expression m, off, len, cp; @@ -m_copydata(m, off, len, (caddr_t)cp) +m_copydata(m, off, len, cp) i had fix it's opinionated idea of formatting by hand though, so i'm not sure it was worth it. ok deraadt@ bluhm@
* Enumerate GCI core, which seems to contain the OTP on the Apple M1.patrick2021-02-242-4/+7
|
* remove unused usbd_get_device_string()jsg2021-02-241-21/+1
| | | | ok mpi@
* remove unused usbdi functionsjsg2021-02-242-44/+2
| | | | ok mpi@
* remove unused xhci_cmd_evaluate_ctx()jsg2021-02-241-22/+1
| | | | ok mpi@
* remove some unused includesjsg2021-02-2315-2189/+0
|
* timecounting: use C99-style initialization for all timecounter structscheloha2021-02-236-39/+53
| | | | | | | | | | | | | | | | | | The timecounter struct is large and I think it may change in the future. Changing it later will be easier if we use C99-style initialization for all timecounter structs. It also makes reading the code a bit easier. For reasons I cannot explain, switching to C99-style initialization sometimes changes the hash of the resulting object file, even though the resulting struct should be the same. So there is a binary change here, but only sometimes. No behavior should change in either case. I can't compile-test this everywhere but I have been staring at the diff for days now and I'm relatively confident this will not break compilation. Fingers crossed. ok gnezdo@
* remove unused acpiec_lock() acpiec_unlock() functionsjsg2021-02-231-28/+1
| | | | ok kettenis@ pirofti@
* Disable double-data rate modes if 1.8V signalling is not possible.patrick2021-02-221-2/+4
| | | | ok kettenis@
* Slow mode is only relevant for legacy and high speed timings.patrick2021-02-221-3/+3
| | | | ok kettenis@
* Improve support for the variant found on the Apple M1 SoC.kettenis2021-02-222-64/+161
| | | | | | | This mostly adjust the interrupt masking and status support since this variant lacks the UINTM and UINTP registers. ok patrick@
* regenjsg2021-02-222-8/+120
|
* add some AMD 500 series, 17h/71h, Navi 10 and Kingston NVMe idsjsg2021-02-221-4/+28
| | | | initial diff from Sven Wolf
* remove warning about amdgpu userptr ioctl being unimplementedjsg2021-02-201-1/+0
| | | | | matches radeon and i915 reported by Benjamin Baier
* Unify unit initialization.mglocker2021-02-171-9/+7
|
* If the device driver open call fails, don't set sc_open since in that casemglocker2021-02-171-5/+7
| | | | | | | we don't get a file handle back which could be closed again, and therefore we couldn't toggle sc_open back to zero. Spotted and ok anton@
* Call 'struct process' parameters 'pr' to distinguish from 'struct proc'mglocker2021-02-171-4/+4
| | | | | | parameters which are usually called 'p'. Spotted and ok anton@
* Collect return code of video_stop() for ioctls calls.mglocker2021-02-171-2/+2
| | | | Spotted and ok anton@
* 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@
* 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 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@
* 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@
* 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'
* Don't hardcode com(4)'s major number in exuart(4).patrick2021-02-111-5/+12
| | | | ok kettenis@
* Add missing break in switch statement of rge_activate().stsp2021-02-111-1/+2
| | | | | | | CID 1501716 ok kevlo@ and mestre@ had the same diff
* 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
* 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@
* If uhidev_set_report_dev() already have been invoked for the givenanton2021-02-111-4/+6
| | | | | | report id, there's no point in trying to find a matching sub device. ok mglocker@
* ddb: when a new wsdisplay console attaches, resize ddb cols/rows to itjcs2021-02-091-1/+9
| | | | ok visa