aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_artop.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
commitcc0680a580b5be81a1ca321b58f8e9b80b5c1052 (patch)
tree57454cdfdc9890f4e8d9f532e9cd240c7361951f /drivers/ata/pata_artop.c
parent955e57dfde4ff75e4d7329ac7a3d645b16015309 (diff)
libata-link: linkify reset
Make reset methods and related functions deal with ata_link instead of ata_port. * ata_do_reset() * ata_eh_reset() * all prereset/reset/postreset methods and related functions This patch introduces no behavior change. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_artop.c')
-rw-r--r--drivers/ata/pata_artop.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index b5352ebecef9..361f2fca7e54 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -40,8 +40,9 @@
40 40
41static int clock = 0; 41static int clock = 0;
42 42
43static int artop6210_pre_reset(struct ata_port *ap, unsigned long deadline) 43static int artop6210_pre_reset(struct ata_link *link, unsigned long deadline)
44{ 44{
45 struct ata_port *ap = link->ap;
45 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 46 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
46 const struct pci_bits artop_enable_bits[] = { 47 const struct pci_bits artop_enable_bits[] = {
47 { 0x4AU, 1U, 0x02UL, 0x02UL }, /* port 0 */ 48 { 0x4AU, 1U, 0x02UL, 0x02UL }, /* port 0 */
@@ -51,7 +52,7 @@ static int artop6210_pre_reset(struct ata_port *ap, unsigned long deadline)
51 if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) 52 if (!pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no]))
52 return -ENOENT; 53 return -ENOENT;
53 54
54 return ata_std_prereset(ap, deadline); 55 return ata_std_prereset(link, deadline);
55} 56}
56 57
57/** 58/**
@@ -71,27 +72,28 @@ static void artop6210_error_handler(struct ata_port *ap)
71 72
72/** 73/**
73 * artop6260_pre_reset - check for 40/80 pin 74 * artop6260_pre_reset - check for 40/80 pin
74 * @ap: Port 75 * @link: link
75 * @deadline: deadline jiffies for the operation 76 * @deadline: deadline jiffies for the operation
76 * 77 *
77 * The ARTOP hardware reports the cable detect bits in register 0x49. 78 * The ARTOP hardware reports the cable detect bits in register 0x49.
78 * Nothing complicated needed here. 79 * Nothing complicated needed here.
79 */ 80 */
80 81
81static int artop6260_pre_reset(struct ata_port *ap, unsigned long deadline) 82static int artop6260_pre_reset(struct ata_link *link, unsigned long deadline)
82{ 83{
83 static const struct pci_bits artop_enable_bits[] = { 84 static const struct pci_bits artop_enable_bits[] = {
84 { 0x4AU, 1U, 0x02UL, 0x02UL }, /* port 0 */ 85 { 0x4AU, 1U, 0x02UL, 0x02UL }, /* port 0 */
85 { 0x4AU, 1U, 0x04UL, 0x04UL }, /* port 1 */ 86 { 0x4AU, 1U, 0x04UL, 0x04UL }, /* port 1 */
86 }; 87 };
87 88
89 struct ata_port *ap = link->ap;
88 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 90 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
89 91
90 /* Odd numbered device ids are the units with enable bits (the -R cards) */ 92 /* Odd numbered device ids are the units with enable bits (the -R cards) */
91 if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no])) 93 if (pdev->device % 1 && !pci_test_config_bits(pdev, &artop_enable_bits[ap->port_no]))
92 return -ENOENT; 94 return -ENOENT;
93 95
94 return ata_std_prereset(ap, deadline); 96 return ata_std_prereset(link, deadline);
95} 97}
96 98
97/** 99/**