aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/sata_fsl.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-04-08 01:46:56 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:25 -0400
commit45db2f6c95eee7c6622ea1b3edb9abafba58e3ab (patch)
tree1c57efcf3e118b177dd7c9c1070b8af70694aff3 /drivers/ata/sata_fsl.c
parent2a0c15ca39f5881aa1b472ca856bb7a2e584ece7 (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/sata_fsl.c')
-rw-r--r--drivers/ata/sata_fsl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 9c4e6a6698c..fddd346b1d5 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -678,6 +678,15 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
return ata_dev_classify(&tf);
}
+static int sata_fsl_prereset(struct ata_linke *link, unsigned long deadline)
+{
+ /* FIXME: Never skip softreset, sata_fsl_softreset() is
+ * combination of soft and hard resets. sata_fsl_softreset()
+ * needs to be splitted into soft and hard resets.
+ */
+ return 0;
+}
+
static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
@@ -1157,6 +1166,7 @@ static const struct ata_port_operations sata_fsl_ops = {
.freeze = sata_fsl_freeze,
.thaw = sata_fsl_thaw,
+ .prereset = sata_fsl_prereset,
.softreset = sata_fsl_softreset,
.post_internal_cmd = sata_fsl_post_internal_cmd,