summaryrefslogtreecommitdiffstats
path: root/sys/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
* avoid using a var uninitialisedjsg2015-10-151-1/+2
| | | | ok jung@
* Prevent a NULL-pointer dereference when closing a ugen(4) nodempi2015-10-131-4/+2
| | | | | | in case the kernel failed to change the interface of a device. Found the hardway by okan
* Always initialise the index into iwm's tx queue array, fixing astsp2015-10-121-3/+2
| | | | | | potential crash. This must have somehow been working by magic. Fruther cleanup of QoS support in this driver is very much needed. ok mpi@
* Add a symbolic name for the special '-1' value of iwm's sc_wantresp.stsp2015-10-112-6/+9
| | | | ok phessler
* In iwm(4), set mbuf pointers to NULL after freeing mbufs.stsp2015-10-101-1/+3
| | | | ok phessler mpi zhuk
* add location to the fan descriptionjung2015-10-101-1/+17
|
* fix wrong brackets in if statementjung2015-10-101-2/+2
|
* Remove evil hack. I've never seen the printf fire, and xenocara no longerkettenis2015-10-091-16/+2
| | | | | | contains any code that can manipulate the affected register directly. ok jsg@
* Implement set_pages_array_wb() and set_pages_array_wc() for powerpc. Sincekettenis2015-10-081-5/+7
| | | | | | | powerpc doesn't actually implement write-combining fall back to uncached mappings. ok mpi@, jsg@
* Call em_start() when we detect a link state change such that packets startkettenis2015-10-081-1/+3
| | | | | | | | flowing again even if the send queue is currently full. Restores the fix made by makeb@ in rev 1.263 which was lost in making the tx completion path mpsafe. ok mikeb@
* In i915_gem_fault(), move the "out" label after the switch state such that wekettenis2015-10-071-2/+3
| | | | | | | don't interpret one of the VM_PAGER_XXX return values as an unhandled errno value and return the intended code instead of VM_PAGER_ERROR. ok jsg@
* 0xffffffff is 32 bits, not 24 bitsmatthew2015-10-061-2/+2
| | | | ok deraadt
* Make sure that tx_buffer->next_eop is properly set before we bump the numberkettenis2015-10-061-7/+13
| | | | | | | | | of available descriptors, such that the interrupt handler doesn't attempt to complete partially initialized descriptors. Seems to fix the watchdog timeouts reported by various people. Tested by Mattieu Baptiste and Gregor Best. ok mikeb@
* Make iwm(4) set the MAC address the same way other wireless drivers do.stsp2015-10-061-7/+6
| | | | ok mpi@
* Simplify iwm(4) newstate task by only queuing one state transitionstsp2015-10-052-53/+26
| | | | | | | | | | | | at a time. The newstate task now always transitions to the most recently requested state, rather than hopping along with every request. This allows us get rid of the silly newstate generation counter, and we can now task_del() a pending transition when the interface goes down. While several issues with this driver remain, I believe this change does not introduce new problems. Tested by myself, jasper@, and zhuk@
* tweak initial output a bit: do not show number of light sensors, just show ifjung2015-10-041-3/+3
| | | | | some is found or not, also remove kbdled output as there is no (known) way to test if (not) available at all
* a macmini has no light sensor, but reading from light sensor keys isjung2015-10-041-9/+3
| | | | | | | | | successful, while info/type reading from same keys fails and avoids initialization; so check the validity flag earlier and do not try to attach invalid (non-existing) keys debugged with help from kettenis
* remove duplicate key, found by kettenisjung2015-10-041-3/+3
|
* Fix memory leak in error path.jmatthew2015-10-041-2/+3
| | | | From Benjamin Baier, found by llvm/scan-build.
* relax vendor comparison to match variations found in olderjung2015-10-011-2/+2
| | | | models for example macmini1,1
* add const, prodded by mpijung2015-10-011-2/+2
|
* remove superfluous sensor_attach() added for debug reasonsjung2015-10-011-2/+1
|
* fix semicolon after if statementjsg2015-10-011-1/+2
| | | | ok jung@
* No need to wakeup(9) the sensor thread because upd_refresh() does notmpi2015-10-011-4/+2
| | | | | | sleep. Discussed with deraadt@
* add a (disabled) driver for the Apple System Management Controller (SMC) asjung2015-09-302-1/+657
| | | | | | found in Apple Intel based devices "go at it" deraadt@
* Run the tx completion path without the kernel held. This makes thekettenis2015-09-302-47/+29
| | | | | | | | | | | "fast path" through the interrupt handler not grab the kernel lock anymore. This removes the code that attempts to reclaim tx descriptors from em_start(). Keeping that code would have complicated the locking. The need to reclaim tx descriptors that way should have largely disappeared now that the interrupt handler doesn't have to wait on the kernel lock. ok mpi@ tested by many
* I missed an #ifdef notyet when enabling the aliasing ppgtt code.kettenis2015-09-301-3/+1
| | | | | Hopefully this fixes the stability problems people have been seeing on sandybridge and up after the ppgtt code got enabled.
* Unlock interrupt handler rx path with intr_barrierchris2015-09-291-3/+15
| | | | ok mikeb@
* get rid of the mutex between access to the status block and myx_downdlg2015-09-291-65/+44
| | | | | | | | | | | | myx is unusual in that it has an explicit command to shut down the chip that gets an interrupt when it's done. so myx_down sends the command and has to sleep until it gets that interrupt. this moves to using a single int to represent that state (so loads and stores are atomic), and sleep_setup/sleep_finish in myx_down to wait for it to change. this has been running in production at work for a few months now tested by chris@
* regenjung2015-09-292-4/+19
|
* add keyboard/trackpad IDs found in recent MacBooks (12" retina)jung2015-09-291-1/+4
| | | | ok mpi@
* Huawei K4511 3G modem.mpi2015-09-291-2/+3
| | | | From phil AT unita.com.au
* regenmpi2015-09-292-4/+9
|
* Huawei K4511 3G modem.mpi2015-09-291-3/+4
| | | | From phil AT unita.com.au
* In low-level suspend routines, set cold=2. In tsleep(), use this toderaadt2015-09-281-2/+2
| | | | | | | | spit out a ddb trace to console. This should allow us to find suspend or resume routines which break the rules. It depends on the console output function being non-sleeping.... but that's another codepath which should try to be safe when cold is set. ok kettenis
* The Linux code that handles the DPMS mode for inteldrm(4) can sleep now.kettenis2015-09-282-8/+26
| | | | | | | Adopt the approach taken by radeondrm(4) and hand the "burner" work off to a task. Avoids the panic reported by Gerald Hanuer, who also tested this fix.
* remove duplicate entry caused by the "Quanta Transcode" devicejsg2015-09-281-1/+0
|
* Remove the "Quanta Transcode" device from the list of supported hardware.kettenis2015-09-281-12/+1
| | | | | | | | | | | It's only supposed to match certain subvendor/subdevice IDs, but our code doesn't check those. The result is that it (incorrectly) overrides the generic match for the HD Graphics P4000 as found on some Xeon E3 CPUs. This device is supposedly a castrated version of that device with the display output parts fused off. According to the original Linux commit it is "some HW being used for a demo", and there have been proposals to remove it from the Linux tree as well. It is unlikely that OpenBSD will ever run on this particular hardware.
* Enable monitor hot plugging for the framebuffer console.kettenis2015-09-274-37/+25
| | | | | Tested on the VGA port of a Radeon 7500 and Radeon 9250 (aka 9200 PRO). Hopefully this works on Intel Graphics as well.
* Fix bsd.rd upgrades over iwm(4), and fix `ifconfig iwm0 lladdr random`.stsp2015-09-271-6/+18
| | | | | | | | | | | The bsd.rd problems happened because of the net80211 detach/attach hack which ran when the firmware is loaded for the first time. Do the minimum of what needs to be done instead. To fix lladdr random pick up a changing MAC address in the ioctl handler and don't overwrite a custom MAC address while loading the firmware. ok kettenis@
* Align the way iwm(4) adds the MAC context with how it's done in Linux iwlwifi.stsp2015-09-271-7/+10
| | | | | Noted by Adrian Chadd (FreeBSD). ok kettenis@
* Use drm_fb_helper_restore_fbdev_mode() to restore the wscons framebufferkettenis2015-09-271-5/+5
| | | | | | whenever we need to. Apologies for the ugly cast. Should fix the locking warnings reported by tobiasu@
* regenkettenis2015-09-272-5/+10
|
* Add another AMD RS780 PCIE found in a dmesg from tobiasu@kettenis2015-09-271-3/+4
|
* Switch remaining users of the FreeBSD refcount apis back to the originaljsg2015-09-2716-212/+250
| | | | | | linux kref/kobject use. ok kettenis@
* Try a little bit harder to clean up if attaching inteldrm(4) fails.kettenis2015-09-263-50/+87
| | | | | | | | | | The crucial bit is that we now clear dev->dev_priv, which prevents the X server from opening /dev/drmN and crashing the kernel because the driver isn't fully initialized. While there, try a little bit harder to print error messages the proper way. Things will still look ugly though if the failure is somewhere in the Linux code.
* Update drm_irq.c to the version from Linux 3.14.52.kettenis2015-09-269-363/+452
| | | | | | Disable the DRM_IOCTL_IRQ_BUSID and DRM_IOCTL_CONTROL ioctls. These are legacy ioctls for DRI1 support, which we no longer support on OpenBSD.
* Apparently Valleyview / Bay Trail has 32-bit BARs, so fetch the type insteadkettenis2015-09-261-7/+11
| | | | of hardcoding them to be 64-bit. Figured out by sthen@
* Make the PPGTT code work. Seems to fix the caching issues on Broadwell.kettenis2015-09-264-16/+151
| | | | | | Comments on some of the later Broadwell-related commits in the Linux tree seem to say that the PPAT flags in for the (global) GTT are simply broken in the hardware.
* Make iwm(4) DPRINTFs show states by name instead of number.stsp2015-09-261-4/+9
|