summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ahci.c
AgeCommit message (Collapse)Author
2008-05-31if a dma mapping contains oddly addressed or odd length segments, then weDavid Gwynne
reject that mapping. this diff cleans up the mapping if it fails those diagnostics. found while looking into an issue for krw@
2008-04-19add a driver flag to force the negotiation of SATA 1 transfersDamien Miller
(1.5Gb/s). Useful where faster speeds are unstable; ok dlg@
2008-04-08pci_chipset_tag_t already_t is_t a_t pointer_tMark Kettenis
2008-04-08Make ahci detachable. Not tested as the ppb on my shitty nvidiaJonathan Gray
board doesn't seem to properly propagate expresscard interrupts. Incoporating suggestions from dlg and kettenis, ok dlg.
2007-11-28the ccb lists protect themselves, so we dont have to check if we're atDavid Gwynne
splbio when getting and putting ata xfers.
2007-11-28make ata controllers protect their own command lists so atascsi doesnt haveDavid Gwynne
to continually go to splbio to ensure its safe to work on them. shrinks code a little.
2007-11-26drive port probes from the scsi midlayer now that it will ask the adapterDavid Gwynne
if a device is there before doing any scsi commands. also implement a free path for when devices are detached. software hotplug has been tested on sili, and ahci is still working according to claudio@
2007-11-19When ignoring whether FR turns on or not, we should still set FRE,Christopher Pascoe
otherwise we risk leaving the port disabled after a stop/start during error recovery. ok dlg@
2007-11-05recognise (and use) ahci 1.2 controllers.David Gwynne
diff from Henrik Gustafsson
2007-11-04when the ati ahci stuff is in the ide compat mode, it can sometimes causeDavid Gwynne
a wdc(4) controller to appear. this code disables the compat mode using some magic niklas gleaned from the linux driver.
2007-10-27work around a chip bug on the ati ixp600 ahci controller. diff mostly fromDavid Gwynne
niklas@ and tested on hardware generously provided by paul de weird.
2007-10-01More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' whereKenneth R Westerback
obvious.
2007-07-03join ahci attach code back together into one function.David Gwynne
2007-07-03jmb pretends to be pci now, so i dont need to let it see ahci_softc so itDavid Gwynne
can provide its own attach glue to ahci.
2007-07-02kettenis suggested that i can use pci_intr_map twice on the same deviceDavid Gwynne
safely, so i tried it and it worked great. i can reuse the pci_attach_args to attach ahci and now pciide to jmb without really modifying either of them. lots of code shrinks. ok jsg@
2007-07-02dont attach on jmicron parts now that jmb(4) does that for us.David Gwynne
2007-07-02move ahci_softc and the prototype for ahci_attach into a header so otherDavid Gwynne
code will be able to see it.
2007-07-02pull ahci_attach apart slightly to accommodate attaching ahci(4) to thingsDavid Gwynne
other than pci(4).
2007-06-29when we attach to the jmicron controllers, whack their configuration aroundDavid Gwynne
a bit. this guarantees that the controller has its ahci stuff enabled for us to use (which was previously done with magic numbers). this also configs the controller to enable a second function for pciide to attach to.
2007-06-29demystify a little more of the jmicron pci control registersDavid Gwynne
2007-06-29define away some of the magic on jmicron controllersDavid Gwynne
2007-06-12Use SATA_SIGNATURE_ATAPI constant instead of a magic number.Alexander Yurchenko
ok dlg@
2007-05-30my (dlg says crappy) laptop requires some more delays in port_reset orTed Unangst
things go really crazy. ok/help toby tom. dlg unhappy but ok.
2007-05-10remove and hide code that isn't used.David Gwynne
found by deraadt@
2007-04-22mark the ccb used for error handling as complete when it completes. thisDavid Gwynne
prevents dmesg spam when we return this ccb to the free list.
2007-04-22unload the dmamap of the ccb used in ncq error handling once we've finishedDavid Gwynne
with it. prevents free panics on sparc64. found by deraadt on a v215.
2007-04-22prettier debug, if it is ever re-enabled, ok dlgTheo de Raadt
2007-04-21disable ahci debug output. ahci is working on the majority of chipsets,David Gwynne
and its not helping us on those that arent.
2007-04-08Whitespace/long line fixups. No code change.Christopher Pascoe
2007-04-08Add compile-time support for coalescing command interrupts to reduce theChristopher Pascoe
overall interrupt rate. #define AHCI_COALESCE to enable.
2007-04-06Wait until we have idled the port before obtaining the error CCB, so asChristopher Pascoe
to avoid tripping a KASSERT in the case when there is more than one outstanding command. ok dlg@
2007-04-02Read log page 10h to determine the NCQ error, instead of aborting allChristopher Pascoe
active commands when an error is encountered. ok dlg@
2007-03-31re-blacklist the via vt8251, there's still something fishy..Jasper Lievisse Adriaanse
ok dlg@
2007-03-31reenable the via 8251 sata chipset. jasper proved it can work if we dontDavid Gwynne
do ncq, so this diff quirks it. tested by jasper@
2007-03-30the VT8251 SATA says it is ahci, but we aren't ready for it. we need toDavid Gwynne
quirk a few things before it will work. this blacklists that controller in ahci so pciide will be able to match it instead. found by jasper@
2007-03-29Avoid leaking a ccb in error paths.Christopher Pascoe
2007-03-29Correct some minor whitespace issues.Christopher Pascoe
2007-03-28While we are determining which NCQ command failed, we will need to ensureChristopher Pascoe
that we don't accidentally complete any other outstanding commands. This introduces wrappers around get_ccb and put_ccb that can temporarily stash our outstanding command state while we are issuing recovery commands. This is just the first step in NCQ recovery - for now we will reset the port on error which will permit further commands to be issued after a NCQ error. ok dlg@
2007-03-28Due to a logic inversion, we would error out any commands that had completedChristopher Pascoe
successfully and not the ones that had actually failed to complete when unable to recover from an NCQ error. ok dlg@
2007-03-28Improve output of some debugging messages.Christopher Pascoe
2007-03-28Some more safety checks on ccb state.Christopher Pascoe
2007-03-27attach ahci based on the pci class and interface fields, not just on aDavid Gwynne
list of pci devices. WARNING: this will cause your disks to change name (wd -> sd) on a supported controller.
2007-03-23Turn AHCI_DEBUG back on for now, so we can see if any commands are timingChristopher Pascoe
out or erroring around the cache flush time.
2007-03-23Track the ATA xfer's state more closely - may help us identify why someChristopher Pascoe
are seeing a panic at halt time.
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-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-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-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.