summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2015-12-22Make xs_setprop a bit more useful by removing property nodesMike Belopuhov
when NULL or zero length value was specified.
2015-12-22Implement a bus_dma(9) abstraction on top of Grant Table APIMike Belopuhov
2015-12-22Remove obsolete comment.Mark Kettenis
2015-12-22The Apple SMC is implemented on a H8S/2117 chip. Communication with the chipMark Kettenis
becomes much more reliably if we pay attention to the IBF and OBF flags. This removes the need for excessive delays and retries, making operations complete in microseconds instead of seconds. This diff also removes flushing the read buffer after a read operations. This doesn't seem to be necessary, but we might need to put that back if the length of a reply changes for some keys. ok jung@, deraadt@
2015-12-21add virtio-console driverStefan Fritsch
This patch adds a new driver for use of virtio-console devices as ttys. It's still in an early state and not compiled by default, yet. Currently it is only wired into amd64. i386 is still missing. Discussed with uebayasi@, deraadt@
2015-12-21Goto a loop_end label rather than using a continue statement for anmmcc
error condition in an inner loop. Found with Coccinelle. Pointed out by tedu@, ok kettenis@ and deraadt@ about three months ago.
2015-12-21Introduce xen_intr_mask and xen_intr_unmask primitivesMike Belopuhov
Mask the event port during xen_intr_establish, but don't set the masked flag in the intsrc. By providing mask and unmask routines we allow the device to decide when to perform these actions. The port will still be unmasked during xen_intr_enable. This allows netfront to fulfil the intr_barrier pattern requirements fairly easily and at the same time should be sufficient for diskfront that doesn't need to fiddle with interrupt masking.
2015-12-21Cleanup hypercall subsystem type definesMike Belopuhov
2015-12-21Don't unmask the port in xen_intr_establishMike Belopuhov
2015-12-20Advertise support for DRM version 1.4. We have support for all the necessaryMark Kettenis
features, and some code (such as the Xorg modesetting driver) actually checks the version. With this change the PCI-based probe method in that driver works. ok jsg@
2015-12-20Do not delay video(4) attachment if the device does not need to loadMartin Pieuchot
a firmware. Regression spotted by deraadt@
2015-12-19Replace 'arc4random() % x' by 'arc4random_uniform(x)'.tb
Diff by Matthew Martin, thanks! ok djm@, tedu@
2015-12-19Remove code that has been unused ever since we removed the agp ioctl interface.Mark Kettenis
ok mpi@
2015-12-19Move agp_generic_enable() prototype to agpvar.h to unbreak the build onMark Kettenis
macppc.
2015-12-19Prevent GPU lockups with KMS & AGP-enable on Uninorth (G4) machines.Martin Pieuchot
Based on linux commit 5613beb46d54da6ef7f1c4589e9f2e60eeb10721 found by jsg@. KMS is now usable on Uninorth machines but X11 output is still corrupted. ok kettenis@
2015-12-19Do not match Uninorth bridges until we have a working KMS with AGPMartin Pieuchot
support for G4 machines. This allows us to enable agp(4) again for G5 machines. ok kettenis@
2015-12-19Add xs_setprop to set device propertiesMike Belopuhov
2015-12-19Fixup a few bugs in xen_intr_{establish,disestablish}Mike Belopuhov
xen_intr_establish was using a variable that hasn't got its value updated in the supplementary check for event channel port unmasking. xen_intr_disestablish didn't save and correctly check the return value of xen_lookup_intsrc call and was incorrectly indexing into the pending event channel port bitmap.
2015-12-18Make ix(4) mpsafer. Take advantage of intr_barrier() to eliminate the mutexMark Kettenis
introduced in the previous step, and use atomic instructions to make the tx completion path mpsafe as well. ok claudio@, mpi@
2015-12-18Fix urtw(4) on big-endian architectures. Patch by Cedric Tessier.Stefan Sperling
Tested by Cedric on macppc/i386, and by myself on macppc.
2015-12-18Make ix(4) mpsafer. Take advantage of intr_barrier() to eliminate the mutexMark Kettenis
introduced in the previous step, and use atomic instructions to make the tx completion path mpsafe as well. ok claudio@, mpi@
2015-12-18Remove two error-on-NULL conditions for allocations that can't fail.mmcc
ok visa@
2015-12-18Remove an error-on-NULL condition after a mallocarray() call that cannotmmcc
fail. This codepath doesn't exist upstream, so it's fine to change. ok jsg@
2015-12-17sprinkling ifndef __linux__ around two variable declarations could notTed Unangst
possibly make this driver portable
2015-12-17s/expresion/expression/gmmcc
2015-12-17If CORB/RIRB are not running, log error message unconditonnalyAlexandre Ratchov
and return error. From Alexey Suslikov <alexey.suslikov at gmail.com>
2015-12-17Add display brightness support. This is available on the last few generationsMark Kettenis
of Thinkpads (x220 and later) and using means the brightness level is coordinated properly with the firmware. This gets rid of the surprising brightness changes that would sometimes happen if you used the brightness keys or if the firmware decided to reset the brightness level for some other reason. ok tedu@, jung@, naddy@
2015-12-17Missing include, spotted by benoit@Martin Pieuchot
2015-12-17Use config_mountroot(9) instead of startuphook_establish(9).Martin Pieuchot
Fix a regression reported by Ian Mcwilliam on tech@
2015-12-16Don't attempt to get the ThinkLight state if neither the KLCG nor the MLCGMark Kettenis
methods are present. Should fix the panic that occurs on older ThinkPads (such as the x201) when you press the ThinkLight key.
2015-12-16Refactor umass_detach() in order to pass a size to free(9).Martin Pieuchot
Based on a diff from Mathieu <naabed AT poolp DOT org>.
2015-12-15ignore unlikely temperature values like -127 degCJoerg Jung
2015-12-15add 2 more temperature keys found in macbook pro (10,2)Joerg Jung
found via key dump diff, run by Bryan Vyhmeister also remove 3 temperature keys which likely do not return useful values verified with help from macbook pro output of tb (4,1 and 5,5), kettenis (12,1), and Cristoph R. Murauer (9,1) via misc@
2015-12-15add more temperature keys found in newer macbook airs (6,1 and 7,2)Joerg Jung
encountered via key dump diff, run by Bryan Vyhmeister
2015-12-15make sure the read fan description is always nul terminatedJoerg Jung
hint from kettenis
2015-12-14Handle the keyboard backlight found on newer Thinkpads. Doesn't handle theMark Kettenis
machines that have both the keyboard backlight and the thinklight (x230, t430) quite right yet. ok jung@ (for a slightly different version of this diff)
2015-12-14Add initial 802.11n support to the iwm(4) driver.Stefan Sperling
Adds support for HT MCS 0-7 (theoretical limit 65 Mbit/s) and the reception of A-MSDU and A-MPDU aggregated frames. None of the optional 11n features are supported for now. MIMO, 40Mhz channels, short guard interval, etc. are left for future work. And we're not sending A-MSDU or A-MPDU frames yet either. Tested with various 11a/b/g/n access points. With some APs I'm seeing a noticable increase in throughput, especially on 5Ghz. Also, fix automatic rate selection by using the current Tx rate selected by AMRR as the upper bound for the firmware's rate table and updating the firmware's table whenever AMRR switches Tx rate, rather than setting the table just once after association and ignoring AMRR updates. ok mpi@ krw@ (earlier version), ok jasper@
2015-12-14"harware" -> "hardware"mmcc
2015-12-13Hook up the ThinkLight to the keyboard backlight support code.Mark Kettenis
For now this only supports the true ThinkLight. Support for the keyboard backlight found on the most recent ThinkPads will follow soon. ok jung@
2015-12-13Sort button defines.Mark Kettenis
2015-12-12Add OpenBSD Id.Reyk Floeter
2015-12-12Add OpenBSD CVS/RCS Ids.Reyk Floeter
mikeb@ doesn't like the Ids, "somebody else has to add them".
2015-12-12x2APIC is currently enabled on HV guests only, not on bare metal, toReyk Floeter
speedup interrupt handling on virtual machines. Unfortunately it is broken on Xen 4.2 or older, so use the early pvbus detection to drop the advertised x2APIC CPU feature. Xen has fixed this in late 2013, but the problem still shows up in "the Cloud" (it doesn't seem to affect others as they either use legacy APIC or Xen IPIs). OK mlarkin@ mikeb@ Cvs: ----------------------------------------------------------------------
2015-12-12enable keyboard backlight support via wskbd(4) hooksJoerg Jung
tested by Bryan Vyhmeister, krw, tb, and myself ok krw tb
2015-12-12Identify hypervisors before configuring other children of the mainbusReyk Floeter
(bios, CPU, interrupt handlers, pvbus). This splits the pvbus attach function into two parts: pvbus_identify() to scan the CPUID registers for supported hypervisors and pvbus_attach() to attach the bus, print information, and configure the children. This will be needed for Xen and KVM, as discussed with mikeb@ and sf@ OK mlarkin@
2015-12-12add new ioctls to control keyboard backlightsJoerg Jung
tested by Bryan Vyhmeister, krw, tb, and myself ok jcs krw tb
2015-12-11remove wrapper function and call LKSB key write directlyJoerg Jung
2015-12-11remove no longer needed prototypeJoerg Jung
2015-12-11instead of checking the status everywhere do it directly after (trying) theJoerg Jung
command and propagate the result
2015-12-11Replace mountroothook_establish(9) by config_mountroot(9) a narrower APIMartin Pieuchot
similar to config_defer(9). ok mikeb@, deraadt@