summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2007-03-22read and write funcs for the global register spaceDavid Gwynne
2007-03-22map the global and port register spaces.David Gwynne
2007-03-22Perform legacy emulation handover for USB1 companion controllers immediatelyChristopher Pascoe
but defer the remainder of their initialisation until after the other devices on their PCI bus have attached. This ensures that any USB2 controller has also completed its initialisation before we start to initialise the USB1 parts. This minimises the chance that a nasty SMM implementation will trash the USB1 controller's config when it performs legacy emulation handover of the USB2 part. This time without accidentally leaving the OHCI controller shutdown, and with some cosmetic fixes. ok dlg@, OHCI tests mglocker@
2007-03-22Reapplication of rev 1.49.Christopher Pascoe
Save SOF (frame timing adjustment) before the very first host controller reset, rather than at suspend/resume, otherwise any BIOS inserted value is lost immediately. ok dlg@
2007-03-22Reapplication of rev 1.36.Christopher Pascoe
Wait the stable power delay on a USB hub only once per hub (not per port), and defer the delay for root hubs until the host controller event thread starts, permitting some concurrency. Speeds up the boot process dramatically when you have lots of host controllers. ok dlg@
2007-03-22Let atascsi issue NCQ commands if the controller supports it.Christopher Pascoe
This includes a nasty hack to reduce openings and throw away command slots if the device supports a lower queue depth than the host controller does. Yes, we're thinking about a better solution.
2007-03-22import sili(4) so it can be worked on in the tree. this will support theDavid Gwynne
silicon image 3124/3132/3531 sata chipsets eventually. so far this is the autoconf glue, an actual match routine for the 3124, and interrupt establishment code. it is split up between pci and ic cos there are cardbus variants of these controllers that we can support in the future. thanks to jolan@ for the name, it was better liked than my initial suggestion of siisl(4).
2007-03-21A polled xfer has completed and been put by the time ata_cmd returns, soChristopher Pascoe
don't use xa->flags afterwards.
2007-03-21NCQ commands generate a "Set Device Bits" FIS upon completion. Enable theChristopher Pascoe
generation of interrupts when they arrive.
2007-03-21Add support for issuing NCQ commands via AHCI.Christopher Pascoe
Because you cannot have NCQ commands active at the same time as standard (non-queued) commands, we must introduce a queueing scheme into the driver. This scheme ensures that a standard command is only issued to the drive when all currently active NCQ commands have finished, and that NCQ command issue is delayed when we have a pending standard command. Additionally, the queueing scheme adds a constraint to ensure that there are never more than two standard commands issued on a port at once. This should ensure that commands become active in the order they were submitted (regardless of their command slot number) both initially and when the port is reactivated after error recovery. These points mean that issuing a standard command effectively serialises the port, which may help us implement meaningful I/O barriers in the future.
2007-03-21Basic support for JMicron PATA.Jonathan Gray
JMB368 supported for now, multi port cards that share PATA/SATA need to do a complicated internal channel mapping dance I plan to look into next. ok grange@
2007-03-21dont print if there is a device found or not, you can figure that out byDavid Gwynne
seeing things attach to the scsibus. ok pascoe@
2007-03-21atascsi sends h2d fis's, not d2h.David Gwynne
2007-03-21replace the array of u_int8_ts for the fis/registers with a struct to makeDavid Gwynne
it a bit easier to read. there are variations on this, but they can be defined later.
2007-03-21For now, reserve one opening so we always have a CCB free to issue a softChristopher Pascoe
reset with during error recovery. Also, ensure that that CCB has been stopped on the chip before putting it back in the pool.
2007-03-20Fix crystal on/off routine (no more panic). Add two new routines toMarcus Glocker
set and clear the device's MAC filter.
2007-03-20An complete lack of peer review before this is commited means it gets pulled.Theo de Raadt
No exceptions.
2007-03-20Use aml_val2int() instead of accessing v_integer directly.Michael Knudsen
`sort of ok' marco (before lock)
2007-03-20Be sure to reset ata_xfer flags for all PACKET transfers, otherwise weChristopher Pascoe
could pick up a previous ATA_F_POLL from a previous non-data command.
2007-03-20add missing FLUSH_CACHE commands.David Gwynne
2007-03-20Document some routines by pointing to the refering specs URL.Marcus Glocker
2007-03-20Basic FLUSH CACHE support.Christopher Pascoe
Note that the ATA spec says we're should retry after error until we see no more errors. This is not (yet) implemented.
2007-03-20Use ALLOCNOW flag when creating PRDT dmamap, otherwise it could fail duringChristopher Pascoe
error handling.
2007-03-20Tag ATAPI transfers that have no data phase correctly, otherwise the commandChristopher Pascoe
isn't sent to the device.
2007-03-20Our timeout and error handlers complete the commands for us, so we shouldChristopher Pascoe
always return ATA_COMPLETE in the polled transfer case. Also, respect the passed in timeout value when polling.
2007-03-20commit the rest of the jmicron ids. jsg has been trying to get me to addDavid Gwynne
these since last year, but i didnt see the point till the code would be useful anywhere.
2007-03-20Oops, remove some unused variables and unmangle a command name.Christopher Pascoe
2007-03-20Cap the device size we present to 2TB, just in case someone attachesChristopher Pascoe
something really big. The SCSI layer isn't yet ready for it.
2007-03-20Move common completion handling into ata_exec itself. Removes a double freeChristopher Pascoe
in the inquiry error paths, as the HBA will have already completed the ata_xfer with an error. Reminder and ok dlg@
2007-03-20Add support for ATA PACKET commands. This should make ATAPI cdrom drives,Christopher Pascoe
etc, just work.
2007-03-20Read the whole SPROM content with a single routine to a own sprom struct.Marcus Glocker
For those people who have reported about broken MAC address at attach time, this should fix the problem.
2007-03-20Catch failed commands and copy the error taskfile back to the ata_cmd,Christopher Pascoe
so that atascsi can deal with it.
2007-03-20move ata command definitions from atascsi.c to atascsi.hDavid Gwynne
2007-03-20on com_console we need a little delay to let fifo flush itself before ↵Michael Shalayeff
resetting it and stuff to avoid garbled dmesg output; found on some arm
2007-03-20missing include and also use time_uptime as art suggested; compiles nowMichael Shalayeff
2007-03-20reorder slightly. ata bits before atascsiDavid Gwynne
2007-03-20Add timeout handling for ATA commands.Christopher Pascoe
2007-03-20nothing from wdc, wd, or any of the existing ata stuff pls. this gets ridDavid Gwynne
of the wdcreg.h include in atascsi. "feel free to remove" pascoe@
2007-03-20Spec says we can't write anything other than the global host control registerChristopher Pascoe
before we enable AHCI, so enable it before resetting saved capabilities.
2007-03-20Minor style fixup.Christopher Pascoe
2007-03-20Request "descriptor processed" interrupts only for PIO requests (inquiry,Christopher Pascoe
etc), and request that the D2H FIS at the completion of all (DMA) commands generate an interrupt. This makes each data transfer generate one interrupt instead of two and should guarantee that the interrupt that is generated actually arrives after the command has completed.
2007-03-20Calculate the residual and copy it back to the scsi_xfer, so that RW actuallyChristopher Pascoe
works. From dlg@
2007-03-20Add support for issuing sector read/write commands.Christopher Pascoe
2007-03-20Split PRDT unload out into its own function, for symmetry.Christopher Pascoe
2007-03-20Instead of having a copy of every register that we will issue in the ata_cmd,Christopher Pascoe
simply include a pointer to the command FIS that we will issue to the device. Include another space where we can copy back an error register set from a failed command. This means that we can now build and issue arbitrary commands from atascsi, and retrieve errors back.
2007-03-20Change API for struct ata_xfer allocation to move it into the device thatChristopher Pascoe
atascsi will be driving, and add it to the AHCI CCB. This effectively gives us all the resources we need for a transfer in one hit, meaning that we don't need to worry about whether we will have a pool shortage or not enough CCBs. The SCSI mid layer should take care to never exceed the number of CCBs we have available, based on our sc_link.openings.
2007-03-20Hook up sd ioctl.Marco Peereboom
2007-03-20Fake out target id for bioc_disk.Marco Peereboom
2007-03-20Use queue.h macros instead of home made for thingy.Marco Peereboom
From tbert <bret.lambert@gmail.com>