diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:23 -0400 |
commit | ac371987a81c61c2efbd6931245cdcaf43baad89 (patch) | |
tree | f88970931b26d2ad344d7d67ddabc64d9b48181d /drivers/ata/ahci.c | |
parent | 57c9efdfb3cee5d4564fcb5f70555e2edb1bc52a (diff) |
libata: clear SError after link resume
SError used to be cleared in ->postreset. This has small hotplug race
condition. If a device is plugged in after reset is complete but
postreset hasn't run yet, its hotplug event gets lost when SError is
cleared. This patch makes sata_link_resume() clear SError. This
kills the race condition and makes a lot of sense as some PMP and host
PHYs don't work properly without SError cleared.
This change makes sata_pmp_std_{pre|post}_reset()'s unnecessary as
they become identical to ata_std counterparts. It also simplifies
sata_pmp_hardreset() and ahci_vt8251_hardreset().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 0f553aaa6f79..a69bcca4eb1b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1377,7 +1377,6 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, | |||
1377 | unsigned long deadline) | 1377 | unsigned long deadline) |
1378 | { | 1378 | { |
1379 | struct ata_port *ap = link->ap; | 1379 | struct ata_port *ap = link->ap; |
1380 | u32 serror; | ||
1381 | bool online; | 1380 | bool online; |
1382 | int rc; | 1381 | int rc; |
1383 | 1382 | ||
@@ -1388,10 +1387,6 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, | |||
1388 | rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context), | 1387 | rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context), |
1389 | deadline, &online, NULL); | 1388 | deadline, &online, NULL); |
1390 | 1389 | ||
1391 | /* vt8251 needs SError cleared for the port to operate */ | ||
1392 | ahci_scr_read(ap, SCR_ERROR, &serror); | ||
1393 | ahci_scr_write(ap, SCR_ERROR, serror); | ||
1394 | |||
1395 | ahci_start_engine(ap); | 1390 | ahci_start_engine(ap); |
1396 | 1391 | ||
1397 | DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class); | 1392 | DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class); |