diff options
Diffstat (limited to 'drivers/ata/pata_amd.c')
-rw-r--r-- | drivers/ata/pata_amd.c | 16 |
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 | ||
130 | static int amd_pre_reset(struct ata_port *ap, unsigned long deadline) | 130 | static 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 | ||
145 | static void amd_error_handler(struct ata_port *ap) | 146 | static 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 | ||
230 | static int nv_pre_reset(struct ata_port *ap, unsigned long deadline) | 231 | static 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 | ||
245 | static void nv_error_handler(struct ata_port *ap) | 247 | static void nv_error_handler(struct ata_port *ap) |