aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_amd.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_amd.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_amd.c')
-rw-r--r--drivers/ata/pata_amd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 04048fcf6305..d0cebe16a8ee 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -119,27 +119,28 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
119} 119}
120 120
121/** 121/**
122 * amd_probe_init - perform reset handling 122 * amd_pre_reset - perform reset handling
123 * @ap: ATA port 123 * @link: ATA link
124 * @deadline: deadline jiffies for the operation 124 * @deadline: deadline jiffies for the operation
125 * 125 *
126 * Reset sequence checking enable bits to see which ports are 126 * Reset sequence checking enable bits to see which ports are
127 * active. 127 * active.
128 */ 128 */
129 129
130static int amd_pre_reset(struct ata_port *ap, unsigned long deadline) 130static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
131{ 131{
132 static const struct pci_bits amd_enable_bits[] = { 132 static const struct pci_bits amd_enable_bits[] = {
133 { 0x40, 1, 0x02, 0x02 }, 133 { 0x40, 1, 0x02, 0x02 },
134 { 0x40, 1, 0x01, 0x01 } 134 { 0x40, 1, 0x01, 0x01 }
135 }; 135 };
136 136
137 struct ata_port *ap = link->ap;
137 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 138 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
138 139
139 if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no])) 140 if (!pci_test_config_bits(pdev, &amd_enable_bits[ap->port_no]))
140 return -ENOENT; 141 return -ENOENT;
141 142
142 return ata_std_prereset(ap, deadline); 143 return ata_std_prereset(link, deadline);
143} 144}
144 145
145static void amd_error_handler(struct ata_port *ap) 146static void amd_error_handler(struct ata_port *ap)
@@ -221,25 +222,26 @@ static void amd133_set_dmamode(struct ata_port *ap, struct ata_device *adev)
221 222
222/** 223/**
223 * nv_probe_init - cable detection 224 * nv_probe_init - cable detection
224 * @ap: ATA port 225 * @lin: ATA link
225 * 226 *
226 * Perform cable detection. The BIOS stores this in PCI config 227 * Perform cable detection. The BIOS stores this in PCI config
227 * space for us. 228 * space for us.
228 */ 229 */
229 230
230static int nv_pre_reset(struct ata_port *ap, unsigned long deadline) 231static int nv_pre_reset(struct ata_link *link, unsigned long deadline)
231{ 232{
232 static const struct pci_bits nv_enable_bits[] = { 233 static const struct pci_bits nv_enable_bits[] = {
233 { 0x50, 1, 0x02, 0x02 }, 234 { 0x50, 1, 0x02, 0x02 },
234 { 0x50, 1, 0x01, 0x01 } 235 { 0x50, 1, 0x01, 0x01 }
235 }; 236 };
236 237
238 struct ata_port *ap = link->ap;
237 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 239 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
238 240
239 if (!pci_test_config_bits(pdev, &nv_enable_bits[ap->port_no])) 241 if (!pci_test_config_bits(pdev, &nv_enable_bits[ap->port_no]))
240 return -ENOENT; 242 return -ENOENT;
241 243
242 return ata_std_prereset(ap, deadline); 244 return ata_std_prereset(link, deadline);
243} 245}
244 246
245static void nv_error_handler(struct ata_port *ap) 247static void nv_error_handler(struct ata_port *ap)