diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:20 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:23 -0400 |
commit | 5958e3025fd9d97429163e074d9cfa3848f51f28 (patch) | |
tree | f20492dc35fc2651452c871fbc812bd4f8379b40 /drivers/ata/libata-eh.c | |
parent | ac371987a81c61c2efbd6931245cdcaf43baad89 (diff) |
libata: move PMP SCR access failure during reset to ata_eh_reset()
If PMP fan-out reset fails and SCR isn't accessible, PMP should be
reset. This used to be tested by sata_pmp_std_hardreset() and
communicated to EH by -ERESTART. However, this logic is generic and
doesn't really have much to do with specific hardreset implementation.
This patch moves SCR access failure detection logic to ata_eh_reset()
where it belongs. As this makes sata_pmp_std_hardreset() identical to
sata_std_hardreset(), the function is killed and replaced with the
standard method.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 21687bbd9a70..d8c4a45dcf26 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2276,6 +2276,11 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2276 | return rc; | 2276 | return rc; |
2277 | 2277 | ||
2278 | fail: | 2278 | fail: |
2279 | /* if SCR isn't accessible on a fan-out port, PMP needs to be reset */ | ||
2280 | if (!ata_is_host_link(link) && | ||
2281 | sata_scr_read(link, SCR_STATUS, &sstatus)) | ||
2282 | rc = -ERESTART; | ||
2283 | |||
2279 | if (rc == -ERESTART || try >= max_tries) | 2284 | if (rc == -ERESTART || try >= max_tries) |
2280 | goto out; | 2285 | goto out; |
2281 | 2286 | ||