summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2015-12-29Tweak previous by de-indenting label and replacing remaining continuesmmcc1-4/+4
with gotos. supported by kettenis@, ok sobrado@
2015-12-29shuffle tx code slightly and mark bge_start as mpsafe.dlg1-22/+17
reviewed by jmatthew@ ok kettenis@
2015-12-29Set UltraDMA transfer mode. Some (early?) SATA drives, such as the Maxtorkettenis2-2/+25
7Y250M0, refuse to do DMA unless the transfer mode has been set. This causes reads (and presumably writes) to time out. Unlike the wdc code, this only sets the UltraDMA transfer mode. If we ever want to support ancient PATA drivers through the atascsi layer, we probably need to set the PIO and/or MWDMA transfer modes as well. ok jmatthew@, dlg@)
2015-12-29Remove NULL-checks before free().mmcc4-37/+21
ok tb@
2015-12-281. Add a loop_end label to the outer loopmmcc1-2/+4
2. Replace a continue statement in an inner loop with goto loop_end This fixes a simple logical bug found with Coccinelle. ok kettenis@
2015-12-28Rework re_start and re_txeof to only check the producer/consumer ringjmatthew3-59/+56
positions when deciding how much work to do, and to adjust rl_tx_free with atomic operations; split the flag that indicates whether we're using timer based interrupts or not out into a separate field so it can be changed from interrupt context without needing a lock; take the kernel lock when calling re_init and re_start from interrupt context; add an interrupt barrier in re_stop; and finally mark the interrupt handler as mpsafe. started by Jim Smith a while ago, mostly finished up at n2k15 tested by dlg@, chris@ and Dimitris Papastamos on various hardware ok dlg@
2015-12-28use ulmin when looking at uio_resid to prevent wrapping around.tedu1-3/+3
from Martin Natano (and also reported by Stefan Kempf)
2015-12-27set sensor type later on initjung1-5/+5
2015-12-27fold for loops back into a wait function in a similar manner as acpiec doesjung1-31/+17
2015-12-27rename kbdled to backlight and mention chip model in commentjung1-11/+11
2015-12-27extra taskq is gone, so also remove the no longer needed init variablejung1-19/+17
2015-12-27simplify and unify keyboard backlight hooks, doing the same kassert instead ofjung1-17/+5
for-loop as acpithinkpad does
2015-12-27with Mark's fix in previous commit the extra taskq for delayed initializationjung1-35/+6
and updates is no longer needed and can be removed, so simplify things and initialize the sensors on attach and update them through the sensors task
2015-12-26Add support for the Perle Speed8 LE.kettenis1-1/+30
2015-12-26regenkettenis2-2/+14
2015-12-26Add Perle Speed8 LE.kettenis1-1/+5
2015-12-25enable iso keyboard munge fix for macbookair6,2jung1-1/+2
ok jcs
2015-12-24more e-mail -> emailmmcc1-2/+2
2015-12-24Remove a couple NULL-checks before free().mmcc1-5/+3
ok sf@
2015-12-23add aml_freevalue in a couple places, avoid storing a result thatjcs1-3/+6
would need to be freed in a couple other places with deraadt
2015-12-23Drop unused goto label.visa1-4/+3
2015-12-22Make xs_setprop a bit more useful by removing property nodesmikeb2-10/+15
when NULL or zero length value was specified.
2015-12-22Implement a bus_dma(9) abstraction on top of Grant Table APImikeb4-6/+529
2015-12-22Remove obsolete comment.kettenis1-8/+1
2015-12-22The Apple SMC is implemented on a H8S/2117 chip. Communication with the chipkettenis1-32/+41
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 driversf2-1/+623
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 anmmcc1-2/+4
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 primitivesmikeb2-2/+39
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 definesmikeb4-22/+23
2015-12-21Don't unmask the port in xen_intr_establishmikeb1-13/+4
2015-12-20Advertise support for DRM version 1.4. We have support for all the necessarykettenis1-2/+2
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 loadmpi1-2/+5
a firmware. Regression spotted by deraadt@
2015-12-19Replace 'arc4random() % x' by 'arc4random_uniform(x)'.tb1-2/+2
Diff by Matthew Martin, thanks! ok djm@, tedu@
2015-12-19Remove code that has been unused ever since we removed the agp ioctl interface.kettenis3-655/+21
ok mpi@
2015-12-19Move agp_generic_enable() prototype to agpvar.h to unbreak the build onkettenis2-3/+3
macppc.
2015-12-19Prevent GPU lockups with KMS & AGP-enable on Uninorth (G4) machines.mpi1-3/+20
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 AGPmpi1-1/+3
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 propertiesmikeb2-2/+32
2015-12-19Fixup a few bugs in xen_intr_{establish,disestablish}mikeb1-10/+6
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 mutexkettenis1-73/+52
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.stsp1-1/+6
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 mutexkettenis2-7/+6
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.mmcc2-11/+2
ok visa@
2015-12-18Remove an error-on-NULL condition after a mallocarray() call that cannotmmcc1-6/+1
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 nottedu3-14/+4
possibly make this driver portable
2015-12-17s/expresion/expression/gmmcc1-2/+2
2015-12-17If CORB/RIRB are not running, log error message unconditonnalyratchov1-7/+3
and return error. From Alexey Suslikov <alexey.suslikov at gmail.com>
2015-12-17Add display brightness support. This is available on the last few generationskettenis1-3/+83
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@mpi1-1/+2
2015-12-17Use config_mountroot(9) instead of startuphook_establish(9).mpi1-4/+12
Fix a regression reported by Ian Mcwilliam on tech@