aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-11-27 05:28:55 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:10 -0500
commit6f1d1e3a03fd04a9d9c82fd3cf414020097bb142 (patch)
treeceb7917e7ca056c2884ef9dd2a239945ad45724c /drivers/ata/libata-eh.c
parent02c05a27e884c9655dae5b1c8bc0cd89c060c43d (diff)
libata: move ata_set_mode() to libata-eh.c
Move ata_set_mode() to libata-eh.c. ata_set_mode() is surely an EH action and will be more tightly coupled with the rest of error handling. Move it to libata-eh.c. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
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;