aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorMikael Pettersson <mikpe@it.uu.se>2008-03-23 18:41:01 +0100
committerJeff Garzik <jeff@garzik.org>2008-03-24 22:31:25 -0400
commitc07a9c4995827a4f4bcdbd07cec40ec87467f308 (patch)
tree8b23625f1cd345b96c71a678af3b251d765b447a /drivers/ata/ahci.c
parentdda7aba119536084d082cd11d4781fe15d7355f2 (diff)
sata_promise: fix hardreset hotplug events, take 2
A Promise SATA controller will signal hotplug events when a hard reset (COMRESET) is done on a port. These events aren't masked by the driver, and the unexpected interrupts will cause a sequence of failed reset attempts util libata's EH finally gives up. This has not been a common problem so far, but the pending libata hardreset-by-default changes makes it a critical issue. The solution is to disable hotplug events before a reset, and to reenable them afterwards. (Promise's driver does this too.) This patch adds SATA-specific versions of ->freeze() and ->thaw() that also disable and enable hotplug events. PATA ports continue to use the old versions of ->freeze() and ->thaw(). Accesses to the hotplug register must be serialised via host->lock. We rely on ap->lock == &ap->host->lock and that libata takes this lock before ->freeze() and ->thaw(). Document this requirement. The interrupt handler is adjusted so its hotplug register accesses are inside the region protected by host->lock. Tested on various chips (SATA300TX4, SATA300TX2plus, SATAII150TX4, FastTrack TX4000) with various combinations of SATA and PATA disks, with and without the pending hardreset-by-default changes. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/ahci.c')
0 files changed, 0 insertions, 0 deletions