diff options
Diffstat (limited to 'drivers/ata/pata_hpt37x.c')
-rw-r--r-- | drivers/ata/pata_hpt37x.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index c5ddd937dbf2..1a4d0ad68d18 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
@@ -304,15 +304,16 @@ static unsigned long hpt370a_filter(struct ata_device *adev, unsigned long mask) | |||
304 | 304 | ||
305 | /** | 305 | /** |
306 | * hpt37x_pre_reset - reset the hpt37x bus | 306 | * hpt37x_pre_reset - reset the hpt37x bus |
307 | * @ap: ATA port to reset | 307 | * @link: ATA link to reset |
308 | * @deadline: deadline jiffies for the operation | 308 | * @deadline: deadline jiffies for the operation |
309 | * | 309 | * |
310 | * Perform the initial reset handling for the 370/372 and 374 func 0 | 310 | * Perform the initial reset handling for the 370/372 and 374 func 0 |
311 | */ | 311 | */ |
312 | 312 | ||
313 | static int hpt37x_pre_reset(struct ata_port *ap, unsigned long deadline) | 313 | static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) |
314 | { | 314 | { |
315 | u8 scr2, ata66; | 315 | u8 scr2, ata66; |
316 | struct ata_port *ap = link->ap; | ||
316 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 317 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
317 | static const struct pci_bits hpt37x_enable_bits[] = { | 318 | static const struct pci_bits hpt37x_enable_bits[] = { |
318 | { 0x50, 1, 0x04, 0x04 }, | 319 | { 0x50, 1, 0x04, 0x04 }, |
@@ -337,7 +338,7 @@ static int hpt37x_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
337 | pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); | 338 | pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); |
338 | udelay(100); | 339 | udelay(100); |
339 | 340 | ||
340 | return ata_std_prereset(ap, deadline); | 341 | return ata_std_prereset(link, deadline); |
341 | } | 342 | } |
342 | 343 | ||
343 | /** | 344 | /** |
@@ -352,7 +353,7 @@ static void hpt37x_error_handler(struct ata_port *ap) | |||
352 | ata_bmdma_drive_eh(ap, hpt37x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); | 353 | ata_bmdma_drive_eh(ap, hpt37x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); |
353 | } | 354 | } |
354 | 355 | ||
355 | static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline) | 356 | static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline) |
356 | { | 357 | { |
357 | static const struct pci_bits hpt37x_enable_bits[] = { | 358 | static const struct pci_bits hpt37x_enable_bits[] = { |
358 | { 0x50, 1, 0x04, 0x04 }, | 359 | { 0x50, 1, 0x04, 0x04 }, |
@@ -360,6 +361,7 @@ static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
360 | }; | 361 | }; |
361 | u16 mcr3, mcr6; | 362 | u16 mcr3, mcr6; |
362 | u8 ata66; | 363 | u8 ata66; |
364 | struct ata_port *ap = link->ap; | ||
363 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 365 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
364 | 366 | ||
365 | if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) | 367 | if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) |
@@ -387,7 +389,7 @@ static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
387 | pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); | 389 | pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); |
388 | udelay(100); | 390 | udelay(100); |
389 | 391 | ||
390 | return ata_std_prereset(ap, deadline); | 392 | return ata_std_prereset(link, deadline); |
391 | } | 393 | } |
392 | 394 | ||
393 | /** | 395 | /** |