diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-08 01:46:56 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:25 -0400 |
commit | 45db2f6c95eee7c6622ea1b3edb9abafba58e3ab (patch) | |
tree | 1c57efcf3e118b177dd7c9c1070b8af70694aff3 /drivers/ata/libata-core.c | |
parent | 2a0c15ca39f5881aa1b472ca856bb7a2e584ece7 (diff) |
libata: move link onlineness check out of softreset methods
Currently, SATA softresets should do link onlineness check before
actually performing SRST protocol but it doesn't really belong to
softreset.
This patch moves onlineness check in softreset to ata_eh_reset() and
ata_eh_followup_srst_needed() to clean up code and help future sata_mv
changes which need clear separation between SCR and TF accesses.
sata_fsl is peculiar in that its softreset really isn't softreset but
combination of hardreset and softreset. This patch adds dummy private
->prereset to keep the current behavior but the driver really should
implement separate hard and soft resets and return -EAGAIN from
hardreset if it should be follwed by softreset.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3401248180c9..f60988f5e01b 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3541,6 +3541,10 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline) "link for reset (errno=%d)\n", rc); } + /* no point in trying softreset on offline link */ + if (ata_link_offline(link)) + ehc->i.action &= ~ATA_EH_SOFTRESET; + return 0; } |