aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/libata-core.c16
-rw-r--r--include/linux/libata.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index c36c5a9a4617..14cdbb336dd5 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)
2296} 2296}
2297 2297
2298/** 2298/**
2299 * ata_std_probeinit - initialize probing
2300 * @ap: port to be probed
2301 *
2302 * @ap is about to be probed. Initialize it. This function is
2303 * to be used as standard callback for ata_drive_probe_reset().
2304 */
2305extern void ata_std_probeinit(struct ata_port *ap)
2306{
2307 if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
2308 sata_phy_resume(ap);
2309}
2310
2311/**
2299 * ata_std_softreset - reset host port via ATA SRST 2312 * ata_std_softreset - reset host port via ATA SRST
2300 * @ap: port to reset 2313 * @ap: port to reset
2301 * @verbose: fail verbosely 2314 * @verbose: fail verbosely
@@ -2485,7 +2498,7 @@ int ata_std_probe_reset(struct ata_port *ap, unsigned int *classes)
2485 if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read) 2498 if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read)
2486 hardreset = sata_std_hardreset; 2499 hardreset = sata_std_hardreset;
2487 2500
2488 return ata_drive_probe_reset(ap, NULL, 2501 return ata_drive_probe_reset(ap, ata_std_probeinit,
2489 ata_std_softreset, hardreset, 2502 ata_std_softreset, hardreset,
2490 ata_std_postreset, classes); 2503 ata_std_postreset, classes);
2491} 2504}
@@ -5535,6 +5548,7 @@ EXPORT_SYMBOL_GPL(ata_port_probe);
5535EXPORT_SYMBOL_GPL(sata_phy_reset); 5548EXPORT_SYMBOL_GPL(sata_phy_reset);
5536EXPORT_SYMBOL_GPL(__sata_phy_reset); 5549EXPORT_SYMBOL_GPL(__sata_phy_reset);
5537EXPORT_SYMBOL_GPL(ata_bus_reset); 5550EXPORT_SYMBOL_GPL(ata_bus_reset);
5551EXPORT_SYMBOL_GPL(ata_std_probeinit);
5538EXPORT_SYMBOL_GPL(ata_std_softreset); 5552EXPORT_SYMBOL_GPL(ata_std_softreset);
5539EXPORT_SYMBOL_GPL(sata_std_hardreset); 5553EXPORT_SYMBOL_GPL(sata_std_hardreset);
5540EXPORT_SYMBOL_GPL(ata_std_postreset); 5554EXPORT_SYMBOL_GPL(ata_std_postreset);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index e8f29cefc351..68b3fe6f9a4d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -488,6 +488,7 @@ extern int ata_drive_probe_reset(struct ata_port *ap,
488 ata_probeinit_fn_t probeinit, 488 ata_probeinit_fn_t probeinit,
489 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 489 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
490 ata_postreset_fn_t postreset, unsigned int *classes); 490 ata_postreset_fn_t postreset, unsigned int *classes);
491extern void ata_std_probeinit(struct ata_port *ap);
491extern int ata_std_softreset(struct ata_port *ap, int verbose, 492extern int ata_std_softreset(struct ata_port *ap, int verbose,
492 unsigned int *classes); 493 unsigned int *classes);
493extern int sata_std_hardreset(struct ata_port *ap, int verbose, 494extern int sata_std_hardreset(struct ata_port *ap, int verbose,