diff options
Diffstat (limited to 'drivers/ata/pata_atiixp.c')
-rw-r--r-- | drivers/ata/pata_atiixp.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 86f85a2cab7e..9623f5295530 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
@@ -33,8 +33,9 @@ enum { | |||
33 | ATIIXP_IDE_UDMA_MODE = 0x56 | 33 | ATIIXP_IDE_UDMA_MODE = 0x56 |
34 | }; | 34 | }; |
35 | 35 | ||
36 | static int atiixp_pre_reset(struct ata_port *ap, unsigned long deadline) | 36 | static int atiixp_pre_reset(struct ata_link *link, unsigned long deadline) |
37 | { | 37 | { |
38 | struct ata_port *ap = link->ap; | ||
38 | static const struct pci_bits atiixp_enable_bits[] = { | 39 | static const struct pci_bits atiixp_enable_bits[] = { |
39 | { 0x48, 1, 0x01, 0x00 }, | 40 | { 0x48, 1, 0x01, 0x00 }, |
40 | { 0x48, 1, 0x08, 0x00 } | 41 | { 0x48, 1, 0x08, 0x00 } |
@@ -44,7 +45,7 @@ static int atiixp_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
44 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) | 45 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) |
45 | return -ENOENT; | 46 | return -ENOENT; |
46 | 47 | ||
47 | return ata_std_prereset(ap, deadline); | 48 | return ata_std_prereset(link, deadline); |
48 | } | 49 | } |
49 | 50 | ||
50 | static void atiixp_error_handler(struct ata_port *ap) | 51 | static void atiixp_error_handler(struct ata_port *ap) |
@@ -172,6 +173,9 @@ static void atiixp_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
172 | * | 173 | * |
173 | * When DMA begins we need to ensure that the UDMA control | 174 | * When DMA begins we need to ensure that the UDMA control |
174 | * register for the channel is correctly set. | 175 | * register for the channel is correctly set. |
176 | * | ||
177 | * Note: The host lock held by the libata layer protects | ||
178 | * us from two channels both trying to set DMA bits at once | ||
175 | */ | 179 | */ |
176 | 180 | ||
177 | static void atiixp_bmdma_start(struct ata_queued_cmd *qc) | 181 | static void atiixp_bmdma_start(struct ata_queued_cmd *qc) |
@@ -198,6 +202,9 @@ static void atiixp_bmdma_start(struct ata_queued_cmd *qc) | |||
198 | * | 202 | * |
199 | * DMA has completed. Clear the UDMA flag as the next operations will | 203 | * DMA has completed. Clear the UDMA flag as the next operations will |
200 | * be PIO ones not UDMA data transfer. | 204 | * be PIO ones not UDMA data transfer. |
205 | * | ||
206 | * Note: The host lock held by the libata layer protects | ||
207 | * us from two channels both trying to set DMA bits at once | ||
201 | */ | 208 | */ |
202 | 209 | ||
203 | static void atiixp_bmdma_stop(struct ata_queued_cmd *qc) | 210 | static void atiixp_bmdma_stop(struct ata_queued_cmd *qc) |
@@ -232,7 +239,6 @@ static struct scsi_host_template atiixp_sht = { | |||
232 | }; | 239 | }; |
233 | 240 | ||
234 | static struct ata_port_operations atiixp_port_ops = { | 241 | static struct ata_port_operations atiixp_port_ops = { |
235 | .port_disable = ata_port_disable, | ||
236 | .set_piomode = atiixp_set_piomode, | 242 | .set_piomode = atiixp_set_piomode, |
237 | .set_dmamode = atiixp_set_dmamode, | 243 | .set_dmamode = atiixp_set_dmamode, |
238 | .mode_filter = ata_pci_default_filter, | 244 | .mode_filter = ata_pci_default_filter, |
@@ -261,9 +267,8 @@ static struct ata_port_operations atiixp_port_ops = { | |||
261 | .irq_handler = ata_interrupt, | 267 | .irq_handler = ata_interrupt, |
262 | .irq_clear = ata_bmdma_irq_clear, | 268 | .irq_clear = ata_bmdma_irq_clear, |
263 | .irq_on = ata_irq_on, | 269 | .irq_on = ata_irq_on, |
264 | .irq_ack = ata_irq_ack, | ||
265 | 270 | ||
266 | .port_start = ata_port_start, | 271 | .port_start = ata_sff_port_start, |
267 | }; | 272 | }; |
268 | 273 | ||
269 | static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 274 | static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) |