aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index b16c81a24ba3..ebab75958900 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2329,6 +2329,31 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
2329 return rc; 2329 return rc;
2330} 2330}
2331 2331
2332/**
2333 * ata_set_mode - Program timings and issue SET FEATURES - XFER
2334 * @link: link on which timings will be programmed
2335 * @r_failed_dev: out paramter for failed device
2336 *
2337 * Set ATA device disk transfer mode (PIO3, UDMA6, etc.). If
2338 * ata_set_mode() fails, pointer to the failing device is
2339 * returned in @r_failed_dev.
2340 *
2341 * LOCKING:
2342 * PCI/etc. bus probe sem.
2343 *
2344 * RETURNS:
2345 * 0 on success, negative errno otherwise
2346 */
2347int ata_set_mode(struct ata_link *link, struct ata_device **r_failed_dev)
2348{
2349 struct ata_port *ap = link->ap;
2350
2351 /* has private set_mode? */
2352 if (ap->ops->set_mode)
2353 return ap->ops->set_mode(link, r_failed_dev);
2354 return ata_do_set_mode(link, r_failed_dev);
2355}
2356
2332static int ata_link_nr_enabled(struct ata_link *link) 2357static int ata_link_nr_enabled(struct ata_link *link)
2333{ 2358{
2334 struct ata_device *dev; 2359 struct ata_device *dev;