summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2015-10-15avoid using a var uninitialisedjsg1-1/+2
ok jung@
2015-10-13Prevent a NULL-pointer dereference when closing a ugen(4) nodempi1-4/+2
in case the kernel failed to change the interface of a device. Found the hardway by okan
2015-10-12Always initialise the index into iwm's tx queue array, fixing astsp1-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@
2015-10-11Add a symbolic name for the special '-1' value of iwm's sc_wantresp.stsp2-6/+9
ok phessler
2015-10-10In iwm(4), set mbuf pointers to NULL after freeing mbufs.stsp1-1/+3
ok phessler mpi zhuk
2015-10-10add location to the fan descriptionjung1-1/+17
2015-10-10fix wrong brackets in if statementjung1-2/+2
2015-10-09Remove evil hack. I've never seen the printf fire, and xenocara no longerkettenis1-16/+2
contains any code that can manipulate the affected register directly. ok jsg@
2015-10-08Implement set_pages_array_wb() and set_pages_array_wc() for powerpc. Sincekettenis1-5/+7
powerpc doesn't actually implement write-combining fall back to uncached mappings. ok mpi@, jsg@
2015-10-08Call em_start() when we detect a link state change such that packets startkettenis1-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@
2015-10-07In i915_gem_fault(), move the "out" label after the switch state such that wekettenis1-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@
2015-10-060xffffffff is 32 bits, not 24 bitsmatthew1-2/+2
ok deraadt
2015-10-06Make sure that tx_buffer->next_eop is properly set before we bump the numberkettenis1-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@
2015-10-06Make iwm(4) set the MAC address the same way other wireless drivers do.stsp1-7/+6
ok mpi@
2015-10-05Simplify iwm(4) newstate task by only queuing one state transitionstsp2-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@
2015-10-04tweak initial output a bit: do not show number of light sensors, just show ifjung1-3/+3
some is found or not, also remove kbdled output as there is no (known) way to test if (not) available at all
2015-10-04a macmini has no light sensor, but reading from light sensor keys isjung1-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
2015-10-04remove duplicate key, found by kettenisjung1-3/+3
2015-10-04Fix memory leak in error path.jmatthew1-2/+3
From Benjamin Baier, found by llvm/scan-build.
2015-10-01relax vendor comparison to match variations found in olderjung1-2/+2
models for example macmini1,1
2015-10-01add const, prodded by mpijung1-2/+2
2015-10-01remove superfluous sensor_attach() added for debug reasonsjung1-2/+1
2015-10-01fix semicolon after if statementjsg1-1/+2
ok jung@
2015-10-01No need to wakeup(9) the sensor thread because upd_refresh() does notmpi1-4/+2
sleep. Discussed with deraadt@
2015-09-30add a (disabled) driver for the Apple System Management Controller (SMC) asjung2-1/+657
found in Apple Intel based devices "go at it" deraadt@
2015-09-30Run the tx completion path without the kernel held. This makes thekettenis2-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
2015-09-30I missed an #ifdef notyet when enabling the aliasing ppgtt code.kettenis1-3/+1
Hopefully this fixes the stability problems people have been seeing on sandybridge and up after the ppgtt code got enabled.
2015-09-29Unlock interrupt handler rx path with intr_barrierchris1-3/+15
ok mikeb@
2015-09-29get rid of the mutex between access to the status block and myx_downdlg1-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@
2015-09-29regenjung2-4/+19
2015-09-29add keyboard/trackpad IDs found in recent MacBooks (12" retina)jung1-1/+4
ok mpi@
2015-09-29Huawei K4511 3G modem.mpi1-2/+3
From phil AT unita.com.au
2015-09-29regenmpi2-4/+9
2015-09-29Huawei K4511 3G modem.mpi1-3/+4
From phil AT unita.com.au
2015-09-28In low-level suspend routines, set cold=2. In tsleep(), use this toderaadt1-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
2015-09-28The Linux code that handles the DPMS mode for inteldrm(4) can sleep now.kettenis2-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.
2015-09-28remove duplicate entry caused by the "Quanta Transcode" devicejsg1-1/+0
2015-09-28Remove the "Quanta Transcode" device from the list of supported hardware.kettenis1-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.
2015-09-27Enable monitor hot plugging for the framebuffer console.kettenis4-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.
2015-09-27Fix bsd.rd upgrades over iwm(4), and fix `ifconfig iwm0 lladdr random`.stsp1-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@
2015-09-27Align the way iwm(4) adds the MAC context with how it's done in Linux iwlwifi.stsp1-7/+10
Noted by Adrian Chadd (FreeBSD). ok kettenis@
2015-09-27Use drm_fb_helper_restore_fbdev_mode() to restore the wscons framebufferkettenis1-5/+5
whenever we need to. Apologies for the ugly cast. Should fix the locking warnings reported by tobiasu@
2015-09-27regenkettenis2-5/+10
2015-09-27Add another AMD RS780 PCIE found in a dmesg from tobiasu@kettenis1-3/+4
2015-09-27Switch remaining users of the FreeBSD refcount apis back to the originaljsg16-212/+250
linux kref/kobject use. ok kettenis@
2015-09-26Try a little bit harder to clean up if attaching inteldrm(4) fails.kettenis3-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.
2015-09-26Update drm_irq.c to the version from Linux 3.14.52.kettenis9-362/+451
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.
2015-09-26Apparently Valleyview / Bay Trail has 32-bit BARs, so fetch the type insteadkettenis1-7/+11
of hardcoding them to be 64-bit. Figured out by sthen@
2015-09-26Make the PPGTT code work. Seems to fix the caching issues on Broadwell.kettenis4-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.
2015-09-26Make iwm(4) DPRINTFs show states by name instead of number.stsp1-4/+9