aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-02-02 18:20:00 +0900
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 01:59:52 -0500
commit8a19ac89edbe9b702c10fd2039b8cb2db4644a5f (patch)
tree9241f1ec6d1a8e713ca60e6e5d098a11beb0dfdf /drivers
parent7944ea9522ce0ea32d57894b3dc2540b0bdca66e (diff)
[PATCH] libata: implement ata_std_probeinit()
This patch implements the off-the-shelf probeinit component operation. Currently, all it does is waking up the PHY if it's a SATA port. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index c36c5a9a461..14cdbb336dd 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2296,6 +2296,19 @@ static int sata_phy_resume(struct ata_port *ap)
}
/**
+ * ata_std_probeinit - initialize probing
+ * @ap: port to be probed
+ *
+ * @ap is about to be probed. Initialize it. This function is
+ * to be used as standard callback for ata_drive_probe_reset().
+ */
+extern void ata_std_probeinit(struct ata_port *ap)
+{
+ if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
+ sata_phy_resume(ap);
+}
+
+/**
* ata_std_softreset - reset host port via ATA SRST
* @ap: port to reset
* @verbose: fail verbosely
@@ -2485,7 +2498,7 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes)
if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
hardreset = sata_std_hardreset;
- return ata_drive_probe_reset(ap, NULL,
+ return ata_drive_probe_reset(ap, ata_std_probeinit,
ata_std_softreset, hardreset,
ata_std_postreset, classes);
}
@@ -5535,6 +5548,7 @@ EXPORT_SYMBOL_GPL(ata_port_probe);
EXPORT_SYMBOL_GPL(sata_phy_reset);
EXPORT_SYMBOL_GPL(__sata_phy_reset);
EXPORT_SYMBOL_GPL(ata_bus_reset);
+EXPORT_SYMBOL_GPL(ata_std_probeinit);
EXPORT_SYMBOL_GPL(ata_std_softreset);
EXPORT_SYMBOL_GPL(sata_std_hardreset);
EXPORT_SYMBOL_GPL(ata_std_postreset);