summaryrefslogtreecommitdiffstats
path: root/sys/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Timeline lock is used from interrupt context so use IPL_TTY to preventkettenis2019-04-211-1/+1
| | | | "locking against myself" panics.
* Fix rbtree_postorder_for_each_entry_safe() implementation. Fixes crasheskettenis2019-04-211-5/+33
| | | | | | seen with the "intel" X driver with the new inteldrm kernel driver. ok (and with help from) jsg@
* armv7 RAMDISK is now compiled with -Oz (just to be like other ramdisks),deraadt2019-04-201-3/+3
| | | | | so clang's rule about "static inline" comes into play. ok patrick
* drm/ttm: Fix bo_global and mem_global kfree errorjsg2019-04-202-10/+0
| | | | | | From Trigger Huang b10cc08374728ea79555a1cd98f962b0f942e942 in linux 4.19.y/4.19.36 30f33126feca0fe16df9e9302ffc28a953e2eb37 in mainline linux
* Adapt radeondrm_detach_kms() to struct drm_device being split fromjsg2019-04-201-1/+1
| | | | | | | drm softc. Avoids uvm_fault() when firmware is missing and radeondrm is forcibly detached. Reported by Mihai Popescu on misc@
* Remove unused parameter from virtio_init_vq()sf2019-04-171-5/+5
|
* Initialize virtqueue before passing it to devicesf2019-04-171-3/+2
| | | | Reported by Gary Zibrat
* When we encounter ppb(4)s that are not configured we allocate a rangepatrick2019-04-161-1/+12
| | | | | | | of bus numbers from the parent's bus extent. On detach, which can happen with hotplug-able devices, we should free those busses. ok kettenis@
* i2c reads are more reliable a byte at a time.dlg2019-04-161-13/+13
| | | | | | reading all 256 at a time was a nice idea, but meant page 0xa2 wasnt appearing like it should. this follows what freebsd does more closely too.
* make sff page reads work on little endian archs too. like amd64.dlg2019-04-161-7/+7
| | | | | | some modules seem to need more time when waiting for bytes while here. hrvoje popovski hit the endian issue
* Use timeout_del_barrier(9) instead of timeout_del(9) followed byvisa2019-04-151-5/+3
| | | | | | conditional timeout_barrier(9). OK kn@ dlg@
* implement SIOCGIFSFFPAGE so ifconfig can get transceiver info.dlg2019-04-151-6/+81
| | | | | | | | myx doesn't allow i2c writes, so you can only read whatever page the firmware is already pointing at on device 0xa0. if you try to read another page it will return ENXIO. tested on a 10G-PCIE-8A-R with an xfp module.
* the myx_cmd struct has to be 4 byte aligned for use with bus_spacedlg2019-04-151-2/+2
| | | | i don't know how this didn't blow up before.
* enum thing needs commas between items.dlg2019-04-151-2/+2
| | | | unbreaks the build...
* there's some new errors that commands can complete with toodlg2019-04-151-1/+5
|
* there's a bunch of new commands in newer firmwaresdlg2019-04-151-2/+35
|
* trim some debug code that printed out the name of a commanddlg2019-04-151-41/+3
| | | | | | | | the list of commands is going to grow, but the thought of keeping the list in debug code up to date with it just makes me feel tired. this prints the command id number instead in the same format we represent it in the header.
* Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 tojsg2019-04-14654-86315/+167959
| | | | | | | | | | | | | | | | | | | linux 4.19.34. Adds support for more Intel hardware: Broxton/Apollo Lake (was is_preliminary in 4.4) Amber Lake (another Kaby Lake refresh) Gemini Lake Coffee Lake Whiskey Lake Cannon Lake (though no hardware with Intel graphics ever shipped) Ice Lake (alpha support, hardware not released) This does not add support for new radeon hardware on the AMD side as newer radeons have a different kernel driver (amdgpu). Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for helping and a bunch of other developers for testing.
* MSFT0101 must require some special handling, since this breaksderaadt2019-04-131-2/+1
| | | | suspend on some machines. Back out until more known.
* Add missing compatibles for newer Linux kernel bindings.kettenis2019-04-131-1/+13
| | | | ok patrick@
* Hide debug printfs.ratchov2019-04-101-4/+4
| | | | ok deraadt
* Add support for X722 to ixl(4)phessler2019-04-101-1/+7
| | | | | | full list of pci ids from sthen@ OK sthen@, jmatthew@, deraadt@
* syncphessler2019-04-102-2/+32
|
* Add support for X722 to ixl(4)phessler2019-04-101-1/+7
| | | | | | full list of pci ids from sthen@ OK sthen@, jmatthew@, deraadt@
* implement support for SIOCGIFSFFPAGEdlg2019-04-101-1/+142
| | | | | | | | | | | | | | | | | | this relies on some firmware commands for accessing the i2c bus that are not available until a relatively recent API version. our nics using API 1.4 and 1.5 don't handle the command, but the API 1.7 nic we have is happy to talk to the module that is plugged into it. xl710 cards (the 40g ones with a qsfp+ connector) can be split up into 4 functions that represent lanes on a single port. you can get qsfp+ to 4x sfp+ cables so you can use the different lanes/functions as completely independent interfaces. however, because each lane/ function is one port and therefore module, we need to serialise access to the module by at least the port. this is to prevent concurrent reads of different pages of the one module from stepping on each other. i took the easy path and made a single ixlsff lock, which is at least conservative.
* add support for SIOCGIFSFFPAGE so userland can read sfp module infodlg2019-04-103-3/+64
| | | | | | | | | access to the ioctl is serialised by a per ifp rwlock so userland reads of different pages in the same device address do not confuse each other. this was pretty straightforward because a lot of the plumbing for accessing the i2c bus was already in place.
* Handle missed service errors, specific to isochronous transfers.ratchov2019-04-101-1/+52
| | | | | | | | | After each MSE, ensuire usbd_complete_transfer() is called for each missed transfer, for which there's no transfer completion event. Fixes crashes and deadlocks in upper layers caused by the missing completion. ok deraadt, patrick; help from mpi, patrick, gmlocker
* Fix URE_WDT6_SET_MODE register definition.kevlo2019-04-101-2/+2
| | | | | | Based on FreeBSD r346028, this fixes ure(4) not detected after a reboot. ok deraadt@
* change psize to a signed int to cope with it going negative sincejcs2019-04-081-4/+3
| | | | | | | the data read during polling may be junk fixed with Petr Ročkai ok deraadt, mpi, stsp
* Make azalia(4) initialize dolby atmos codecs in the resume path.stsp2019-04-081-1/+4
| | | | | Keeps stereo sound intact across suspend/resume cycles on the matebook x. ok phessler@ deraadt@
* Try to start playback after play buffer pointers are advanced.ratchov2019-04-051-4/+6
| | | | | | Allows playback to start automatically as soon as there's enough data, even if the AUDIO_START ioctl is not called. This is mainly useful to quickly test & debug low level drivers with simple shell commands.
* Make tpm(4) attach to MSFT0101 chips.edd2019-04-041-1/+2
| | | | | | | I found this chip in my Lenovo Thinkpad X1 (5th gen): tpm0 at acpi0: TPM_ addr 0xfed40000/0x5000: device 0x001b15d1 rev 0x10 "Yes, please commit this" deraadt@. Thanks.
* Simplify underruns handling: just copy silence produced by upper layer.ratchov2019-04-041-30/+7
| | | | | This makes the code less bug prone as the "rare" underruns conditions are handled by the main non-underrun code.
* Avoid potential null-pointer dereference. Found by Kent R. Spillner.kettenis2019-04-041-3/+3
| | | | ok deraadt@, jsg@
* The ASUS E200HA reads the register at "address" 0x00 instead of 0x18.kettenis2019-04-041-1/+2
|
* Correct access to doorbell. In radeondrm this is only present and usedjsg2019-04-031-2/+2
| | | | | | | with gfx7/sea islands hardware. Fixes ring 2 test failure on carrizo-l/mullins. Problem found by kettenis@ in a different part of the drm 4.19 tree.
* Always copy data (if any) whenever a new bounce buffer is available.ratchov2019-04-031-1/+2
|
* Check for available space before copying data to the bounce buffers.ratchov2019-04-031-12/+6
| | | | | No behavior change as we don't call uaudio_pdata_copy() in situations when bounce buffers may not be available.
* Make the uaudio_stream->ubuf_xfer relative to current xfer number.ratchov2019-04-031-9/+35
| | | | | No behavior change. The new representation is equivalent but eases detection of overflows and underflows.
* disable MSI for AMD Summit Ridge/Raven Ridge HD Audio as workaround for audio stopping after varying amounts of time. ok brynet@, deraadt@thfr2019-04-021-1/+10
|
* Don't detach non-removable devices during resume on "sdhc* at acpi?".stsp2019-04-025-8/+19
| | | | | | Makes hibernate work with rootfs on built-in emmc storage. Tested on King Jim Portabook. ok deraadt@ kettenis@
* Correctly extract the RSSI information from the structure. It'spatrick2019-04-011-2/+2
| | | | | | | | a 16-bit value, so we have to use letoh16() instead of letoh32(). Also properly cast it to signed, so that it can be sign-extended properly. ok stsp@
* Enable RF_KILL interrupts on resumekn2019-04-011-1/+4
| | | | | | | | | | | | | Like the interrupt handler, the resume path needs to check the register to update flags in order to propagate the hardware kill switch state, otherwise the driver would still consider the switch to be off after resume even though it may have changed while in S3. Fix the resume path by simply applying the same idiom already found in iwm_start_hw(). This will ensure seemless operation no matter which combination of switch toggling and suspend/resume users will follow. OK stsp
* Fix interrupt handler to set RUNNING flag when RF switch is enabledkn2019-04-011-6/+5
| | | | | | | | | | | | | | | | | | With an UP and RUNNING interface, turning off the hardware kill switch removes the RUNNING flag and powers down the device. Iff still UP, switching it back would not reset the flag accordingly. Fix this in analogy to sys/dev/pci/if_iwn.c revision 1.204 by scheduling iwm_init() unconditionally on both hardware kill switch edges; it'll take care of everything else. Tested with iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0xbb, msi iwm0: hw rev 0x140, fw ver 16.242414.0 OK deraadt stsp
* In the upstreamed and official device tree for i.MX8MQ the clockspatrick2019-04-012-342/+291
| | | | | | | | have changed. The clocks are not split into SRC, PRE_DIV, DIV and CG anymore. There is only a single index for each clock and we need to handle them as composite clocks internally. ok kettenis@
* imxdwusb(4) and imxpd(4) are no longer needed.patrick2019-04-013-158/+1
| | | | ok kettenis@
* In the upstreamed and official device tree for i.MX8MQ the USB physpatrick2019-04-011-5/+7
| | | | | | | use only one address and size cells. Also set the assigned clocks and enable them. ok kettenis@
* In the upstreamed and official device tree for i.MX8MQ the power domains arepatrick2019-04-011-1/+48
| | | | | | not separate nodes, but instead part of imxgpc(4). ok kettenis@
* Repair "} if" and make it the intended "} else if", compare the correspondingnaddy2019-04-011-4/+4
| | | | ror_*() functions. Also, the result doesn't actually change. ok deraadt@
* repair "} if" from an ancient merge error; ok deraadt@ kn@naddy2019-04-011-2/+2
|