diff options
Diffstat (limited to 'drivers/ata/pata_artop.c')
-rw-r--r-- | drivers/ata/pata_artop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index b5352ebecef9..361f2fca7e54 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
@@ -40,8 +40,9 @@ | |||
40 | 40 | ||
41 | static int clock = 0; | 41 | static int clock = 0; |
42 | 42 | ||
43 | static int artop6210_pre_reset(struct ata_port *ap, unsigned long deadline) | 43 | static 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 | ||
81 | static int artop6260_pre_reset(struct ata_port *ap, unsigned long deadline) | 82 | static 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 | /** |