summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ahci.c
AgeCommit message (Collapse)Author
2012-08-11Fix state tracking for the error ccb, and pay attention when the READ_LOG_EXTJonathan Matthew
command used in ncq error recovery fails. Fixes 'ccb->ccb_xa.state == ATA_S_ONCHIP' assertion failures when talking to dying disks. broken disk supplied by Aidan Rowe ok dlg@
2012-07-02Hibernate i/o implementation for ahci(4). This works with an ATI SBx00Jonathan Matthew
controller, but other brands (jmicron and intel have been tested) don't like something in the sleep process so they just lock up.
2012-06-29fix obvious panic on resume with AHCI_DEBUG enabledJonathan Matthew
ok dlg@
2012-06-28Fix issues with AMD chipset ahci(4) attach functions.Stuart Henderson
from Brad, ok jmatthew mikeb. - Have the SB700 attach routine properly call the IDE to AHCI function and migrate the ATI_SBX00_SATA_1 PCI id to using the SB700 attach routine. The SB600 routine was being used because it does the proper call. This just makes it so all of the SB700 controllers use the same attach routine, especially incase any other workarounds/errata type things come up or not setting SB600 things for SB700. - Have the Hudson-2 attach routine set the AHCI_F_IPMS_PROBE flag to resolve the issue with Port Multiplier support. The SB700 attachment function was being used because it was setting the flag. This also fixes the other Hudson-2 AHCI controllers so they won't experience the same issue.
2012-06-05When error recovery fails, just fail the command. Attempting errorJonathan Matthew
recovery again results in a panic as the ccb used for error recovery is already in use. ok dlg@, tested by benno@
2012-05-05Sync with renamed and new AMD Hudson-2 entries done in pcidevs r1.1640Stuart Henderson
From Brad, ok mikeb@
2012-04-13Fix waiting problem at boot on AMD Hudson's AHCI.sasano
Ok by mikeb@ and deraadt@
2012-02-04Close races where timer is started on a command and then an splbio()Kenneth R Westerback
is called before the command is started. This might have resulted in the timeout firing and invalidating the command before it is started. Move the timeout_add_* inside the relevant splbio()/splx(). ok miod@ tedu@
2011-11-14Use a fixed io_page for all hibernate I/O, which is needed forMike Larkin
ahci_hibernate_io, a skeleton of which is also provided in this diff. This code is from deraadt@. Tested on a few wd machines to ensure it works there as well.
2011-10-27Split AHCI port multiplier detection out into a separate function.Jonathan Matthew
As a side effect, we now restore the correct (original) command register value rather than one read halfway through the reset process, which gets port multipliers working on some ATI devices. Also tested on JMicron and Intel AHCIs. ok dlg@
2011-10-26Convert some ahci port multiplier printfs to DPRINTFs as they'reJonathan Matthew
only useful for debugging. ok dlg@
2011-08-20Don't wait for FR to come on after setting the FRE bit in the port commandMark Kettenis
register. The spec doesn't say we have to do this while it mentions several times one needs to wait for FR to clear after clearing FRE. The Linux driver doesn't wait for it either. This allows us to get rid of the AHCI_F_IGN_FR quirk. As a side-effect this diff will probably stop ahci(4) attaching to (some) NVIDIA fakeRAID devices. That's good since it is consistent with what we do for Intel fakeRAID. ok mikeb@, jmatthew@
2011-07-04Intel AHCIs don't support port multipliers so far, yet some (mostly ICH9 and ↵Jonathan Matthew
3400 series) report that they do, and some BIOSes for those chipsets don't clear the capability bit like they're supposed to. Since we know it doesn't work, don't check for port multipliers on these controllers. Replaces my earlier hack for a specific 3400 series device. ok kettenis@ phessler@
2011-06-14Intel 3400 AHCI responds to PMP probes like ATI SBx00 chips.Jonathan Matthew
Unknown whether this also applies to product id 3b23 as well as 3b22. Problem reported by John Danks in PR6630 ok dlg@
2011-06-02Attempt msi interrupt mapping, with fall back to old-style mapping. WorksKenneth R Westerback
on my non-msi capable ahci and several msi capable setups. Dark suspicions that some will NOT work so put it in to smoke any such systems into the open. ok deraadt@ mk@ kettenis@
2011-05-08Move ata_put_xfer() from ata_xfer to atascsi_methods. It's just sillyMatthew Dempsky
to have a non-changing function pointer be part of an object rather than it's virtual method table. ok dlg@; tested on ahci(4) by Mattieu Baptiste, jasper@, and Jason Crawford; no sili(4) testers, but identical changes to ahci(4)
2011-04-24get the error ccbs state right for a put when a port is empty. should getDavid Gwynne
rid of noise during boot. reported by many.
2011-04-21steal the ccb for error handling before it might be needed during theDavid Gwynne
port init. problem reported by RD Thrush in PR6590
2011-04-21ahci asks atascsi to reserve a ccb to use for error handling, but thenDavid Gwynne
atascsi goes and throws away all the ccbs that the disk wont use, including the reserved one. this makes ahci reserve its own ccb. light testing by krw@ without regression.
2011-04-07Do not use NULL in integer comparisons. No functional change.Miod Vallat
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
2011-04-03Another driver made safer for big mem by dma_alloc/dma_free'ingKenneth R Westerback
memory used for i/o. ok dlg@ deraadt@
2011-01-28we deal with polled ccbs erroring out properly, we dont have to complainDavid Gwynne
about it unless we want verbose debug shizz.
2011-01-28ahci0: timed out 1, active 0, count 0 during pmp probe timeouts should beDavid Gwynne
quiet unless we want verbose output.
2011-01-26Add port multiplier support, has been in snaps for a while with no reportedDale Rahn
issues. No actual OKs, but general acknowledgement and 'get it in' from several.
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-07-03Turns out theMark Kettenis
/* XXX maybe more than the default wait is appropriate here? */ in ahci_port_portreset() is true, at least when we come out of suspend. Allow a timeout of 3s here while keeping all the other delays at 1s. ok dlg@, kettenis@
2010-07-02add more MCP79 AHCI ids to the list of devices that need special handling,Jonathan Gray
lets ahci work on jcr's Alienware M17x. ok dlg@
2010-06-29Add code to make ahci(4) suspend/resume properly. Probably not perfect yet,Mark Kettenis
but it seems to work reliably on several laptops. ok dlg@ (a while ago), tested by mlarkin@ and marco@
2010-05-24atascsi may (will) reuse ata_xfers, meaning the xa state thatDavid Gwynne
ahci_ata_cmd is called with might be the state of the xfer that ahci set previously. this stops ahci_ata_cmd from checking the state of ata_xfers its given, and instead trusts that atascsi is doing the right thing. reported and fix tested by matthew dempsky, who also did an awesome job of tracing the problem.
2010-05-19BUS_DMA_ZERO instead of alloc, map, bzero.Owain Ainsworth
ok krw@
2010-04-16Remove Intel RAID IDs for now. They can be added back when code has beenMark Kettenis
written to detect the Intel RAID metadata format such that we no longer risk overwriting it. If this makes you lose your disks, you'll need to change the controller type from RAID to AHCI in the BIOS to get them back. ok marco@, deraadt@
2010-04-08these files don't need to include proc.h anymore. ok oga for agpTed Unangst
2010-04-06add Intel 82801GR RAID.David Gwynne
2010-03-15Add support for 82801HBM RAID. 'that diff can go in' kettenis@Dale Rahn
2010-03-15Add id for Intel 82801JI RAID. Lets HP GL360 G6 see internal SATAKenneth R Westerback
drives. Reported on misc@ by 'a b <rclocal () yahoo ! co ! uk', who also tested the diff from Brad. ok kettenis@ for 4.7.
2010-01-21Use ahci_nvidia_mcp_attach() for nvidia MCP79 ("Ion"), without whichStuart Henderson
the driver fails to detect disks. From Wouter Coene, ok jsg@
2010-01-10ATI AHCI seems not to put slot number into the command registerAlexander Yurchenko
on error as the spec requires. This triggers kernel assertion error because zero is read from the register and wrong ccb is picked from the queue. To cope with it if there's only one outstanding command get its slot number from the active commands mask, otherwise fail all active commands. ok krw@ dlg@
2009-12-28Add MCP73_AHCI_5 to list of devices started in that special NVidiaKenneth R Westerback
way. Fixes ahci on my Acer Aspire AX1800-E9102. Clue from jsg@, ok deraadt@.
2009-12-08claim Intel 82801H RAID by pci id. it might be in RAID mode, not ahci.David Gwynne
makes the disks in a dell 960 work. there's probably a lot of other ids that should be added here too
2009-12-07get rid of the return codes from command submission, ata_cmd handlersDavid Gwynne
now return void. all state about a command is now represented within the ata_xfer structure, and all layers using it (both hba and atascsi) now check only ata_xfer. this relies on my scsi midlayer changes. it was written just before the second last backout of the midlayer.
2009-11-01add support for the ati sb900^Whudson2 chips.David Gwynne
from brad
2009-10-24recognise ahci 1.3 devices, maybe they'll Just Work(tm).David Gwynne
2009-10-17Another MCP77 controller that while matched already by class,Jonathan Gray
needs to be told to use the nvidia specific quirks to detect attached devices. From and tested by minusf@obiit.org
2009-10-13sort the device list. from Brad.Stuart Henderson
2009-10-05nvidia MCP73 on acer aspire m1640; proger@uaoug.org.uaTheo de Raadt
2009-09-13ATI SB700 can be handled in ahci mode like SB600. suggested byMatthieu Herrb
and ok kettenis@
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2009-01-21Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).Alexander Yurchenko
No functional changes. ok krw@ miod@
2008-12-13;5Anvidia mcp67 ahci controller also needs special handling.Mike Belopuhov
from Marko Pecic. thanks!
2008-12-07yet another one nvidia ahci controller that needs special handling.Mike Belopuhov
from form@. ok dlg, krw