aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_artop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_artop.c')
-rw-r--r--drivers/ata/pata_artop.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index b5352ebecef9..d4218310327b 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/**
@@ -330,7 +332,6 @@ static struct scsi_host_template artop_sht = {
330}; 332};
331 333
332static const struct ata_port_operations artop6210_ops = { 334static const struct ata_port_operations artop6210_ops = {
333 .port_disable = ata_port_disable,
334 .set_piomode = artop6210_set_piomode, 335 .set_piomode = artop6210_set_piomode,
335 .set_dmamode = artop6210_set_dmamode, 336 .set_dmamode = artop6210_set_dmamode,
336 .mode_filter = ata_pci_default_filter, 337 .mode_filter = ata_pci_default_filter,
@@ -359,13 +360,11 @@ static const struct ata_port_operations artop6210_ops = {
359 .irq_handler = ata_interrupt, 360 .irq_handler = ata_interrupt,
360 .irq_clear = ata_bmdma_irq_clear, 361 .irq_clear = ata_bmdma_irq_clear,
361 .irq_on = ata_irq_on, 362 .irq_on = ata_irq_on,
362 .irq_ack = ata_irq_ack,
363 363
364 .port_start = ata_port_start, 364 .port_start = ata_sff_port_start,
365}; 365};
366 366
367static const struct ata_port_operations artop6260_ops = { 367static const struct ata_port_operations artop6260_ops = {
368 .port_disable = ata_port_disable,
369 .set_piomode = artop6260_set_piomode, 368 .set_piomode = artop6260_set_piomode,
370 .set_dmamode = artop6260_set_dmamode, 369 .set_dmamode = artop6260_set_dmamode,
371 370
@@ -392,9 +391,8 @@ static const struct ata_port_operations artop6260_ops = {
392 .irq_handler = ata_interrupt, 391 .irq_handler = ata_interrupt,
393 .irq_clear = ata_bmdma_irq_clear, 392 .irq_clear = ata_bmdma_irq_clear,
394 .irq_on = ata_irq_on, 393 .irq_on = ata_irq_on,
395 .irq_ack = ata_irq_ack,
396 394
397 .port_start = ata_port_start, 395 .port_start = ata_sff_port_start,
398}; 396};
399 397
400 398