summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2021-02-25The firmware replaces the last 32-bit on RAM with a shared DRAM address.patrick1-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.
2021-02-25Some newer chips have two D11/802.11 cores, and we need to reset both atpatrick2-5/+38
the same time.
2021-02-25Support for version 7 of the bwfm(4) PCIe interface. The size of the itemspatrick2-5/+7
on the rx/tx complete rings has increased slightly to accomodate possible new features.
2021-02-25Add some infrastructure in the PCI chipset tag for pci_probe_device_hook()patrick4-4/+36
so that we can provide IOMMU-hooked bus DMA tags for each PCI device. ok kettenis@
2021-02-25Add a framework for IOMMUs.kettenis2-2/+108
ok patrick@
2021-02-25Prevent zero size devices from attachingjan1-6/+11
This also fixes two NULL ptr derefs in later code path. OK patick@, krw@
2021-02-25we don't have to cast to caddr_t when calling m_copydata anymore.dlg12-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@
2021-02-24Enumerate GCI core, which seems to contain the OTP on the Apple M1.patrick2-4/+7
2021-02-24remove unused usbd_get_device_string()jsg1-21/+1
ok mpi@
2021-02-24remove unused usbdi functionsjsg2-44/+2
ok mpi@
2021-02-24remove unused xhci_cmd_evaluate_ctx()jsg1-22/+1
ok mpi@
2021-02-23remove some unused includesjsg15-2189/+0
2021-02-23timecounting: use C99-style initialization for all timecounter structscheloha6-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@
2021-02-23remove unused acpiec_lock() acpiec_unlock() functionsjsg1-28/+1
ok kettenis@ pirofti@
2021-02-22Disable double-data rate modes if 1.8V signalling is not possible.patrick1-2/+4
ok kettenis@
2021-02-22Slow mode is only relevant for legacy and high speed timings.patrick1-3/+3
ok kettenis@
2021-02-22Improve support for the variant found on the Apple M1 SoC.kettenis2-63/+160
This mostly adjust the interrupt masking and status support since this variant lacks the UINTM and UINTP registers. ok patrick@
2021-02-22regenjsg2-8/+120
2021-02-22add some AMD 500 series, 17h/71h, Navi 10 and Kingston NVMe idsjsg1-4/+28
initial diff from Sven Wolf
2021-02-20remove warning about amdgpu userptr ioctl being unimplementedjsg1-1/+0
matches radeon and i915 reported by Benjamin Baier
2021-02-17Unify unit initialization.mglocker1-9/+7
2021-02-17If the device driver open call fails, don't set sc_open since in that casemglocker1-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@
2021-02-17Call 'struct process' parameters 'pr' to distinguish from 'struct proc'mglocker1-4/+4
parameters which are usually called 'p'. Spotted and ok anton@
2021-02-17Collect return code of video_stop() for ioctls calls.mglocker1-2/+2
Spotted and ok anton@
2021-02-16Add support for the UART found on the Apple M1 SoC.kettenis2-10/+30
ok patrick@
2021-02-16Introduce debug levels since the current debug output is too noisy bymglocker1-17/+18
default.
2021-02-16Poll battery sensors less frequently. The previous period was quiteanton1-2/+2
arbitrary and inspired by other USB drivers.
2021-02-16Trim uhidpp_device_features() by extracting two pure protocol functions.anton1-18/+52
2021-02-16Enable multiple opens of a video(4) device as described in the V4L2mglocker1-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@
2021-02-15Back-out USB data toggle fix for HID devices, since we received multiplemglocker1-43/+1
reports about broken devices, e.g. for ukbd(4) and fido(4). ok mpi@
2021-02-15move the rearming of the cq after the refill of the rq.dlg1-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@
2021-02-14regenkettenis2-2/+12
2021-02-14Add a few more devices that show up on the Apple M1 mini.kettenis1-1/+3
ok patrick@, deraadt@
2021-02-14Postpone installation of the periodic sensor task until at least oneanton1-2/+4
device has connected.
2021-02-14Bail out earlier during attach if no devices are paired with theanton1-4/+7
receiver.
2021-02-14Enumerate all features supported by a device on connect.anton1-6/+93
Should help diagnose various reports regarding missing battery sensors.
2021-02-14Introduce variables to deal with bit layout differences in the UFSTATkettenis1-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@
2021-02-14correct drm work flush behaviourjsg2-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'
2021-02-11Don't hardcode com(4)'s major number in exuart(4).patrick1-5/+12
ok kettenis@
2021-02-11Add missing break in switch statement of rge_activate().stsp1-1/+2
CID 1501716 ok kevlo@ and mestre@ had the same diff
2021-02-11Initialize var since it's used in a condition a little bit afterwards.mestre1-2/+2
CID 1501713 ok jmatthew@
2021-02-11Initialize the stack local device id variable correctly.anton1-2/+2
CID 1501705
2021-02-11Make room for handling of HID++ 1.0 devices. No functional change.anton1-56/+69
2021-02-11Use idx suffix consistently.anton1-17/+17
2021-02-11Remove unused software id macro.anton1-2/+1
2021-02-11Fold long line.anton1-2/+3
2021-02-11Stop uhidpp from claiming all report ids, instead only claim theanton1-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@
2021-02-11Add uhidev_unset_report_dev(), doing the opposite ofanton2-2/+13
uhidev_set_report_dev(). Needed by some upcoming changes to uhidpp. ok mglocker@
2021-02-11If uhidev_set_report_dev() already have been invoked for the givenanton1-4/+6
report id, there's no point in trying to find a matching sub device. ok mglocker@
2021-02-09ddb: when a new wsdisplay console attaches, resize ddb cols/rows to itjcs1-1/+9
ok visa