summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2014-03-27last of the htolem32 bitsdlg2-19/+27
2014-03-27fix a theoretical double free.daniel1-2/+4
ok tedu@
2014-03-27everything is at least 4 byte aligneddlg1-55/+55
2014-03-27tweak mpii_start.dlg1-14/+26
on 64bit archs you can post the descriptor in one go, which is easy. on 32bit you have to post it in halves in the right order, which is not atomic and requires barriers for ordering.
2014-03-27the request and reply descriptors are 8 byte aligned for the hardware.dlg1-3/+3
2014-03-27tweak the looping of the postqdlg1-9/+12
2014-03-27you want the ring to wrap when it gets to the size of the ring, not onedlg1-2/+2
after it. jmatthew@ figured out i am bad at c.
2014-03-27optimise mpii_push_reply.dlg1-7/+10
int types are easier to work with than shorts. use a compare to handle ring wraparound rather than a mod operation.
2014-03-27updating the reply queue indexes on the chip dont have any dependentdlg1-5/+7
register ops, so dont need barriers around them.
2014-03-27remove unused macrosdlg1-5/+1
2014-03-27forgot a htolem32dlg1-2/+2
2014-03-27apply more htolemXX and lemtohXX.dlg1-65/+65
2014-03-27Check for PS_SUGID/PS_SUGIDEXEC against the correct set of flagsguenther1-2/+2
ok deraadt@
2014-03-27move to htolemXX and lemtohXX. interestingly, this caught a few typedlg1-33/+31
errors which may have affected operation on BE archs. ok jmatthew@
2014-03-26No need to include <sys/lock.h> when only <sys/rwlock.h> is needed,mpi12-37/+25
so remove the former and include the latter instead of pulling it in <dev/pci/agpvar.h>. This header already requires various other types anyway. While here remove unneeded headers.
2014-03-26Move p_emul and p_sigcode from proc to process.guenther1-12/+13
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
2014-03-25Instead of matching root hubs with a custom address, that only worksmpi8-26/+20
because USB_START_ADDR is defined to 0 and the softc is M_ZERO'd, assume that root hubs are the only devices with a depth of 0. Root hubs can now happily be detached and reattached.
2014-03-25Remove and shuffle some includes to reduce their number since drmP.hmpi4-22/+17
is included by a lot of files.
2014-03-25Upon resume do a full reset of the HC, including the command and eventmpi3-24/+34
rings, and rewrite all the addresses in the registers. While here don't keep a copy of our usb(4) child device, autoconf(9) knows how to reach our children.
2014-03-25when working with the cdb its better to use cmdlen than datalen.dlg1-2/+2
ok jmatthew@
2014-03-25use lemtohXX and htolemXX as much as possibledlg1-41/+39
2014-03-25when reading from the chip you use letoh32, not htole32.dlg1-2/+2
jmatthew@ agrees with me
2014-03-25rework qle_put_cmd to use hto[lb]emXX as best it can.dlg2-22/+33
ok jmatthew@
2014-03-25everything is at least 4 byte aligned.dlg1-59/+59
2014-03-25use htolem32 to write out qle sg elements, and annotate the structure asdlg2-27/+29
being 4 byte aligned. rewrite qle_put_data_seg so it takes an address and length rather than a dma descriptor so it can be used to write sges for arbitrary things rather than just dmamaps. use it to write out all sges. ok jmatthew@
2014-03-25Add a driver for simple usb serial devices, it attachesjsg2-1/+190
ucom but doesn't set any custom callbacks. John Long has a HPx9G+ device that requires this.
2014-03-25regenjsg2-4/+9
2014-03-25add HP-x9G+jsg1-1/+2
2014-03-24add support for aux button strip on newer thinkpads like the 2ndjcs1-4/+78
generation x1 carbon that have done away with regular F1-F12 keys from rivo nurges <rix at estpak.ee> and reportedly tested on x1 carbon, x220, and x61s
2014-03-24Another round of reducing diffs with the Linux codebase.kettenis14-119/+107
2014-03-24shrink the iopath a bit by using htolemXX and lemtohXX.dlg1-8/+9
2014-03-24scsi io bits are at least 4 byte aligneddlg1-3/+3
2014-03-24mpii_sges are 4 byte aligned. makes storing the flags field a bit easierdlg1-2/+2
on strict alignment archs.
2014-03-24make mpii_sge look like mpi_sge, and provide a wrapper for setting thedlg2-17/+16
address in it like the one in mpi too. shrinks load_xs a bit
2014-03-24bcopy to memcpydlg1-5/+5
2014-03-24replace bzero with memsetdlg1-19/+19
2014-03-24rework mpii to use tasks instead of scsi_tasks for sas event handling.dlg1-61/+60
scsi_tasks are still backed by workq, and i dont like having to allocate storage to defer work. sas events that cause hotplug events are queued in the softc to be handled by a single task that loops on the queue for work. think levelled interrupts. this has a side effect that interrupts are necessary to enumerate devices for attachment. i wrote this toward the end of last year, but thought it best to wait for 5.5 unlock.
2014-03-24use htolemXX and lemtohXX in the scsi_cmd paths.dlg2-9/+9
apart from the flags handling in sgls, this shrinks the io hot path on sparc64 and powerpc a lot. its pretty much the same on i386/amd64/alpha.
2014-03-24mpi scatter gather lists are 24 bytes long and next to each other indlg2-30/+24
memory. that means you cant do 8 byte loads and stores on the sg_addr member cos it wont be 8 byte aligned half the time which makes strict alignment archs (ie, the fun ones ones) upset. annotate the sge as being 4 byte aligned. replace the sg_addr member with sg_addr_lo and sg_addr_hi. replace htole64 assignment of the sg addr with a wrapper that does the right thing with a couple of htolem32 calls. generated code shrinks again.
2014-03-24factor out the setting of the request context field so mpi_start does itdlg1-16/+7
on behalf of all its callers. use htolem32 and lemtoh32 to handle the message context. both save bytes.
2014-03-24annotate some packed structures with the alignment the hardwaredlg1-5/+5
requires and the driver provides. without this gcc assumes the alignment of these structures is 1, which leads to some horrible asm. this is particularly interesting when reading stuff from the myx_status struct (like the txdone count) which needs to be atomic. doing byte reads and shifting them into a word in registers isnt atomic. its also probably a bit slow. specifying the alignment fixes this. deraadt@ warned me about this maybe 8 years ago.
2014-03-24nothing after the irq ack posting relies on it being ordered.dlg1-3/+1
2014-03-23Fix uhidev_detach() when detaching a device which did not claimed for allandre1-2/+3
report IDs, on those cases some positions on sc_subdevs[] can be null. Initial analysis by guenther@. ok mpi@
2014-03-23Revert audio key handling, requested by ratchov@mpi1-1/+17
2014-03-23my bad, last commit was not ok deraadt, revert it.ratchov1-2/+7
2014-03-22<sys/agpio.h> is gone; this compiles fine without itguenther1-1/+0
2014-03-20add USB_PRODUCT_ITUNER_USBLCD256x64 as UQ_BAD_HID so libusb can talk viaabieber1-1/+2
interrupt transfers OK sthen@
2014-03-20syncabieber2-4/+9
2014-03-20Add ITUNER USBLCD256x64abieber1-1/+2
OK sthen@
2014-03-20Add several devices we already have defined in usbdevs and are also known to beandre2-2/+2
UPSes. (forced commit due to previous empty commit message) ok mpi@ sthen@