summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 99f4bf6022ee..c36c5a9a4617 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2485,7 +2485,8 @@ 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, ata_std_softreset, hardreset,
+ return ata_drive_probe_reset(ap, NULL,
+ ata_std_softreset, hardreset,
ata_std_postreset, classes);
}
@@ -2524,6 +2525,7 @@ static int do_probe_reset(struct ata_port *ap, ata_reset_fn_t reset,
/**
* ata_drive_probe_reset - Perform probe reset with given methods
* @ap: port to reset
+ * @probeinit: probeinit method (can be NULL)
* @softreset: softreset method (can be NULL)
* @hardreset: hardreset method (can be NULL)
* @postreset: postreset method (can be NULL)
@@ -2552,12 +2554,15 @@ static int do_probe_reset(struct ata_port *ap, ata_reset_fn_t reset,
* if classification fails, and any error code from reset
* methods.
*/
-int ata_drive_probe_reset(struct ata_port *ap,
+int ata_drive_probe_reset(struct ata_port *ap, ata_probeinit_fn_t probeinit,
ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
ata_postreset_fn_t postreset, unsigned int *classes)
{
int rc = -EINVAL;
+ if (probeinit)
+ probeinit(ap);
+
if (softreset) {
rc = do_probe_reset(ap, softreset, postreset, classes);
if (rc == 0)
OpenPOWER on IntegriCloud