diff options
Diffstat (limited to 'drivers/ata/pata_optidma.c')
-rw-r--r-- | drivers/ata/pata_optidma.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index f89bdfde16d0..6b07b5b48532 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
@@ -47,14 +47,15 @@ static int pci_clock; /* 0 = 33 1 = 25 */ | |||
47 | 47 | ||
48 | /** | 48 | /** |
49 | * optidma_pre_reset - probe begin | 49 | * optidma_pre_reset - probe begin |
50 | * @ap: ATA port | 50 | * @link: ATA link |
51 | * @deadline: deadline jiffies for the operation | 51 | * @deadline: deadline jiffies for the operation |
52 | * | 52 | * |
53 | * Set up cable type and use generic probe init | 53 | * Set up cable type and use generic probe init |
54 | */ | 54 | */ |
55 | 55 | ||
56 | static int optidma_pre_reset(struct ata_port *ap, unsigned long deadline) | 56 | static int optidma_pre_reset(struct ata_link *link, unsigned long deadline) |
57 | { | 57 | { |
58 | struct ata_port *ap = link->ap; | ||
58 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 59 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
59 | static const struct pci_bits optidma_enable_bits = { | 60 | static const struct pci_bits optidma_enable_bits = { |
60 | 0x40, 1, 0x08, 0x00 | 61 | 0x40, 1, 0x08, 0x00 |
@@ -63,7 +64,7 @@ static int optidma_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
63 | if (ap->port_no && !pci_test_config_bits(pdev, &optidma_enable_bits)) | 64 | if (ap->port_no && !pci_test_config_bits(pdev, &optidma_enable_bits)) |
64 | return -ENOENT; | 65 | return -ENOENT; |
65 | 66 | ||
66 | return ata_std_prereset(ap, deadline); | 67 | return ata_std_prereset(link, deadline); |
67 | } | 68 | } |
68 | 69 | ||
69 | /** | 70 | /** |
@@ -323,25 +324,26 @@ static u8 optidma_make_bits43(struct ata_device *adev) | |||
323 | 324 | ||
324 | /** | 325 | /** |
325 | * optidma_set_mode - mode setup | 326 | * optidma_set_mode - mode setup |
326 | * @ap: port to set up | 327 | * @link: link to set up |
327 | * | 328 | * |
328 | * Use the standard setup to tune the chipset and then finalise the | 329 | * Use the standard setup to tune the chipset and then finalise the |
329 | * configuration by writing the nibble of extra bits of data into | 330 | * configuration by writing the nibble of extra bits of data into |
330 | * the chip. | 331 | * the chip. |
331 | */ | 332 | */ |
332 | 333 | ||
333 | static int optidma_set_mode(struct ata_port *ap, struct ata_device **r_failed) | 334 | static int optidma_set_mode(struct ata_link *link, struct ata_device **r_failed) |
334 | { | 335 | { |
336 | struct ata_port *ap = link->ap; | ||
335 | u8 r; | 337 | u8 r; |
336 | int nybble = 4 * ap->port_no; | 338 | int nybble = 4 * ap->port_no; |
337 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 339 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
338 | int rc = ata_do_set_mode(ap, r_failed); | 340 | int rc = ata_do_set_mode(link, r_failed); |
339 | if (rc == 0) { | 341 | if (rc == 0) { |
340 | pci_read_config_byte(pdev, 0x43, &r); | 342 | pci_read_config_byte(pdev, 0x43, &r); |
341 | 343 | ||
342 | r &= (0x0F << nybble); | 344 | r &= (0x0F << nybble); |
343 | r |= (optidma_make_bits43(&ap->device[0]) + | 345 | r |= (optidma_make_bits43(&link->device[0]) + |
344 | (optidma_make_bits43(&ap->device[0]) << 2)) << nybble; | 346 | (optidma_make_bits43(&link->device[0]) << 2)) << nybble; |
345 | pci_write_config_byte(pdev, 0x43, r); | 347 | pci_write_config_byte(pdev, 0x43, r); |
346 | } | 348 | } |
347 | return rc; | 349 | return rc; |
@@ -366,7 +368,6 @@ static struct scsi_host_template optidma_sht = { | |||
366 | }; | 368 | }; |
367 | 369 | ||
368 | static struct ata_port_operations optidma_port_ops = { | 370 | static struct ata_port_operations optidma_port_ops = { |
369 | .port_disable = ata_port_disable, | ||
370 | .set_piomode = optidma_set_pio_mode, | 371 | .set_piomode = optidma_set_pio_mode, |
371 | .set_dmamode = optidma_set_dma_mode, | 372 | .set_dmamode = optidma_set_dma_mode, |
372 | 373 | ||
@@ -396,13 +397,11 @@ static struct ata_port_operations optidma_port_ops = { | |||
396 | .irq_handler = ata_interrupt, | 397 | .irq_handler = ata_interrupt, |
397 | .irq_clear = ata_bmdma_irq_clear, | 398 | .irq_clear = ata_bmdma_irq_clear, |
398 | .irq_on = ata_irq_on, | 399 | .irq_on = ata_irq_on, |
399 | .irq_ack = ata_irq_ack, | ||
400 | 400 | ||
401 | .port_start = ata_port_start, | 401 | .port_start = ata_sff_port_start, |
402 | }; | 402 | }; |
403 | 403 | ||
404 | static struct ata_port_operations optiplus_port_ops = { | 404 | static struct ata_port_operations optiplus_port_ops = { |
405 | .port_disable = ata_port_disable, | ||
406 | .set_piomode = optiplus_set_pio_mode, | 405 | .set_piomode = optiplus_set_pio_mode, |
407 | .set_dmamode = optiplus_set_dma_mode, | 406 | .set_dmamode = optiplus_set_dma_mode, |
408 | 407 | ||
@@ -432,9 +431,8 @@ static struct ata_port_operations optiplus_port_ops = { | |||
432 | .irq_handler = ata_interrupt, | 431 | .irq_handler = ata_interrupt, |
433 | .irq_clear = ata_bmdma_irq_clear, | 432 | .irq_clear = ata_bmdma_irq_clear, |
434 | .irq_on = ata_irq_on, | 433 | .irq_on = ata_irq_on, |
435 | .irq_ack = ata_irq_ack, | ||
436 | 434 | ||
437 | .port_start = ata_port_start, | 435 | .port_start = ata_sff_port_start, |
438 | }; | 436 | }; |
439 | 437 | ||
440 | /** | 438 | /** |