aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-08-06 05:36:23 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:31 -0400
commit0260731f0187840e272bfa10d3ba0f3e417976f5 (patch)
treed39219275e89ce782f3151b5ac47726957a81e24 /drivers/ata/libata-core.c
parentcc0680a580b5be81a1ca321b58f8e9b80b5c1052 (diff)
libata-link: linkify config/EH related functions
Make the following functions deal with ata_link instead of ata_port. * ata_set_mode() * ata_eh_autopsy() and related functions * ata_eh_report() and related functions * suspend/resume related functions * ata_eh_recover() and related functions Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 73f66f4e1eeb..944f54457c8f 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2171,7 +2171,7 @@ int ata_bus_probe(struct ata_port *ap)
2171 } 2171 }
2172 2172
2173 /* configure transfer mode */ 2173 /* configure transfer mode */
2174 rc = ata_set_mode(ap, &dev); 2174 rc = ata_set_mode(&ap->link, &dev);
2175 if (rc) 2175 if (rc)
2176 goto fail; 2176 goto fail;
2177 2177
@@ -2782,7 +2782,7 @@ static int ata_dev_set_mode(struct ata_device *dev)
2782 2782
2783/** 2783/**
2784 * ata_do_set_mode - Program timings and issue SET FEATURES - XFER 2784 * ata_do_set_mode - Program timings and issue SET FEATURES - XFER
2785 * @ap: port on which timings will be programmed 2785 * @link: link on which timings will be programmed
2786 * @r_failed_dev: out paramter for failed device 2786 * @r_failed_dev: out paramter for failed device
2787 * 2787 *
2788 * Standard implementation of the function used to tune and set 2788 * Standard implementation of the function used to tune and set
@@ -2797,9 +2797,9 @@ static int ata_dev_set_mode(struct ata_device *dev)
2797 * 0 on success, negative errno otherwise 2797 * 0 on success, negative errno otherwise
2798 */ 2798 */
2799 2799
2800int ata_do_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) 2800int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev)
2801{ 2801{
2802 struct ata_link *link = &ap->link; 2802 struct ata_port *ap = link->ap;
2803 struct ata_device *dev; 2803 struct ata_device *dev;
2804 int rc = 0, used_dma = 0, found = 0; 2804 int rc = 0, used_dma = 0, found = 0;
2805 2805
@@ -2877,7 +2877,7 @@ int ata_do_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev)
2877 2877
2878/** 2878/**
2879 * ata_set_mode - Program timings and issue SET FEATURES - XFER 2879 * ata_set_mode - Program timings and issue SET FEATURES - XFER
2880 * @ap: port on which timings will be programmed 2880 * @link: link on which timings will be programmed
2881 * @r_failed_dev: out paramter for failed device 2881 * @r_failed_dev: out paramter for failed device
2882 * 2882 *
2883 * Set ATA device disk transfer mode (PIO3, UDMA6, etc.). If 2883 * Set ATA device disk transfer mode (PIO3, UDMA6, etc.). If
@@ -2890,12 +2890,14 @@ int ata_do_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev)
2890 * RETURNS: 2890 * RETURNS:
2891 * 0 on success, negative errno otherwise 2891 * 0 on success, negative errno otherwise
2892 */ 2892 */
2893int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev) 2893int ata_set_mode(struct ata_link *link, struct ata_device **r_failed_dev)
2894{ 2894{
2895 struct ata_port *ap = link->ap;
2896
2895 /* has private set_mode? */ 2897 /* has private set_mode? */
2896 if (ap->ops->set_mode) 2898 if (ap->ops->set_mode)
2897 return ap->ops->set_mode(ap, r_failed_dev); 2899 return ap->ops->set_mode(link, r_failed_dev);
2898 return ata_do_set_mode(ap, r_failed_dev); 2900 return ata_do_set_mode(link, r_failed_dev);
2899} 2901}
2900 2902
2901/** 2903/**