summaryrefslogtreecommitdiffstats
path: root/sys/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add a barrier between reading the cqe flags and the command ID, whichjmatthew2021-02-091-1/+3
| | | | | | | | should ensure that we don't read a stale command ID and complete the wrong scsi io. powerpc64 base builds were crashing like this fairly regularly. ok deraadt@ dlg@
* change discipline name from "RAID1C" to "RAID 1C" to match the man pagesstsp2021-02-081-2/+2
|
* Add a RAID1C (raid1 + crypto) softraid(8) discipline.stsp2021-02-081-0/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RAID1C discipline encrypts data like the CRYPTO discipline, and accepts multiple chunks during creation and assembly like the RAID1 discipline. To deal with failing disks a RAID1C volume may be assembled with a smaller number of chunks than the volume was created with. The volume will then come up in degraded state. If the volume is now detached and assembled again with the correct number of chunks, any re-added chunks will require a rebuild. Consequently, assembling RAID1C volumes requires careful attention to the chunks passed via 'bioctl -l'. If a chunk is accidentally omitted from the command line during volume assembly, then this chunk will need to be rebuilt. At least one known-good chunk is required in order to assemble the volume. Like CRYPTO, RAID1C supports passphrase and key-disk authentication. Key-disk based volumes are assembled automatically if the key disk is present while the system is booting up. Unlike CRYPTO and RAID1, there is no boot support for RAID1C yet. RAID1C largely reuses existing code of RAID1 and CRYPTO disciplines. At present RAID1C's discipline-specific data structure is shared with that of the CRYPTO discipline to allow re-use of existing CRYPTO code. A custom RAID1C data structure would require CRYPTO code to access struct sr_crypto via a pointer instead of via a member field of struct sr_discipline. ok jsing@
* Add a RAID1C (raid1 + crypto) softraid(8) discipline.stsp2021-02-083-31/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RAID1C discipline encrypts data like the CRYPTO discipline, and accepts multiple chunks during creation and assembly like the RAID1 discipline. To deal with failing disks a RAID1C volume may be assembled with a smaller number of chunks than the volume was created with. The volume will then come up in degraded state. If the volume is now detached and assembled again with the correct number of chunks, any re-added chunks will require a rebuild. Consequently, assembling RAID1C volumes requires careful attention to the chunks passed via 'bioctl -l'. If a chunk is accidentally omitted from the command line during volume assembly, then this chunk will need to be rebuilt. At least one known-good chunk is required in order to assemble the volume. Like CRYPTO, RAID1C supports passphrase and key-disk authentication. Key-disk based volumes are assembled automatically if the key disk is present while the system is booting up. Unlike CRYPTO and RAID1, there is no boot support for RAID1C yet. RAID1C largely reuses existing code of RAID1 and CRYPTO disciplines. At present RAID1C's discipline-specific data structure is shared with that of the CRYPTO discipline to allow re-use of existing CRYPTO code. A custom RAID1C data structure would require CRYPTO code to access struct sr_crypto via a pointer instead of via a member field of struct sr_discipline. ok jsing@
* Simplify sleep_setup API to two operations in preparation for splittingmpi2021-02-083-14/+10
| | | | | | | | | | | | the SCHED_LOCK(). Putting a thread on a sleep queue is reduce to the following: sleep_setup(); /* check condition or release lock */ sleep_finish(); Previous version ok cheloha@, jmatthew@, ok claudio@
* Prevent that when ugen(4) tries to set an alternative configurationmglocker2021-02-051-1/+5
| | | | | | | | | | descriptor (usually doesn't happen), that we continue to use an outdated cdesc pointer which still refers to the previous cdesc. Instead update the cdesc pointer to the new configuration descriptor. Reported by Thomas Jeunet <cleptho AT gmail DOT com> ok phessler@
* arm_intr_establish_fdt() has long been renamed to fdt_intr_establish().patrick2021-02-053-8/+7
|
* Fix CVS tag.patrick2021-02-051-1/+1
|
* Fix whitespace.patrick2021-02-051-2/+2
|
* Rename probe/attach functions to fit our regular naming scheme. Replacepatrick2021-02-051-13/+13
| | | | | | | | | &armv7_bs_tag with fdt_cons_bs_tag, which is our early console bus tag for both arm64 and armv7. On armv7, it points to &armv7_bs_tag. With this we can get rid of the armv7var.h include. Reduce a bit of diff to imxuart(4). ok kettenis@
* Move exuart(4) to sys/dev/fdt so it can be shared between arm64 and armv7.patrick2021-02-053-1/+1057
| | | | ok kettenis@
* Tedu unnecessary imxuartvar.h.patrick2021-02-042-21/+1
| | | | ok kettenis@
* Add uhidpp(4), a driver for Logitech HID++ devices. Currently limited toanton2021-02-042-1/+1060
| | | | | | | | | exposing battery sensors for HID++ 2.0 devices. Most of the code is derived from the hid-logitech-hidpp Linux driver. Thanks to Ville Valkonen <weezeldinga at gmail dot com> for testing. ok mglocker@
* Add uhidev_set_report_dev() allowing usb drivers to early on install aanton2021-02-042-5/+25
| | | | | | | handler for a specific report id. Needed by an upcoming driver in order to communicate with the device already in the attach routine. ok mglocker@ as part of a larger diff
* After the rev. 1.108 commit we see some issues with ugen(4) behaviour,mglocker2021-02-031-1/+5
| | | | | | | | | | which finally makes umb(4) fail, since ugen(4) attaches to one of the umb(4) interfaces, fails, and marks the whole device dying. Therefore make usbd_device2interface_handle() backwards compatible again. Problem reported by Mikolaj Kucharski. ok edd@
* handle #pinctrl-cells 2jsg2021-02-011-2/+7
| | | | | needed for >= linux 5.9 dtbs on bbb ok kettenis@
* Align the mixed naming for the variables used to reference tomglocker2021-02-014-31/+31
| | | | | | | | | bInterfaceNumber and bAlternateSetting as following: ifaceidx -> ifaceno altidx -> altno Suggested and ok mpi@
* Spacing.mglocker2021-01-311-2/+2
|
* Add basic support for BCM4378 as found on the Apple M1 SoCs. There's apatrick2021-01-313-3/+12
| | | | little bit more to do though before it can be enabled.