aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/scc_pata.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-27 13:13:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-27 13:13:06 -0400
commitfba5c1af5c4fd6645fe62ea84ccde0981282cf66 (patch)
tree834022eb683e0badd5a1e5eb5957f74c0e69ebb4 /drivers/ide/pci/scc_pata.c
parentf222eba0f9d98376d363b51fcc2361fb56929844 (diff)
parent077e3bdb9ec34d7cb5751b5be81a4a0f6f0eb5dc (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (49 commits) ide-tape: remove tape->merge_stage ide-tape: mv tape->merge_stage_size tape->merge_bh_size ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer ide-tape: make __idetape_discard_read_pipeline() of type void ide: remove now unused ide_pci_create_host_proc() ide: remove /proc/ide/ali ide-tape: improve buffer pages freeing strategy ide-tape: mv tape->pages_per_stage tape->pages_per_buffer ide-tape: mv tape->stage_size tape->buffer_size ide-tape: improve buffer allocation strategy ide: add struct ide_io_ports (take 3) ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2) ide: sanitize ide_unregister() usage mpc8xx-ide: use ide_find_port() ide: add "noacpi" / "acpigtf" / "acpionboot" parameters gayle: add "doubler" parameter ide: add "cdrom=" and "chs=" parameters ide: add "nodma|noflush|noprobe|nowerr=" parameters ide: remove obsoleted "hdx=autotune" kernel parameter ...
Diffstat (limited to 'drivers/ide/pci/scc_pata.c')
-rw-r--r--drivers/ide/pci/scc_pata.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 17cf86490d59..ad7cdf9060ca 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -334,7 +334,7 @@ static int scc_dma_end(ide_drive_t *drive)
334 334
335 /* errata A308 workaround: Step5 (check data loss) */ 335 /* errata A308 workaround: Step5 (check data loss) */
336 /* We don't check non ide_disk because it is limited to UDMA4 */ 336 /* We don't check non ide_disk because it is limited to UDMA4 */
337 if (!(in_be32((void __iomem *)hwif->io_ports[IDE_ALTSTATUS_OFFSET]) 337 if (!(in_be32((void __iomem *)hwif->io_ports.ctl_addr)
338 & ERR_STAT) && 338 & ERR_STAT) &&
339 drive->media == ide_disk && drive->current_speed > XFER_UDMA_4) { 339 drive->media == ide_disk && drive->current_speed > XFER_UDMA_4) {
340 reg = in_be32((void __iomem *)intsts_port); 340 reg = in_be32((void __iomem *)intsts_port);
@@ -438,7 +438,7 @@ static int scc_dma_test_irq(ide_drive_t *drive)
438 u32 int_stat = in_be32((void __iomem *)hwif->dma_base + 0x014); 438 u32 int_stat = in_be32((void __iomem *)hwif->dma_base + 0x014);
439 439
440 /* SCC errata A252,A308 workaround: Step4 */ 440 /* SCC errata A252,A308 workaround: Step4 */
441 if ((in_be32((void __iomem *)hwif->io_ports[IDE_ALTSTATUS_OFFSET]) 441 if ((in_be32((void __iomem *)hwif->io_ports.ctl_addr)
442 & ERR_STAT) && 442 & ERR_STAT) &&
443 (int_stat & INTSTS_INTRQ)) 443 (int_stat & INTSTS_INTRQ))
444 return 1; 444 return 1;
@@ -534,8 +534,8 @@ static int scc_ide_setup_pci_device(struct pci_dev *dev,
534 } 534 }
535 535
536 memset(&hw, 0, sizeof(hw)); 536 memset(&hw, 0, sizeof(hw));
537 for (i = IDE_DATA_OFFSET; i <= IDE_CONTROL_OFFSET; i++) 537 for (i = 0; i <= 8; i++)
538 hw.io_ports[i] = ports->dma + 0x20 + i * 4; 538 hw.io_ports_array[i] = ports->dma + 0x20 + i * 4;
539 hw.irq = dev->irq; 539 hw.irq = dev->irq;
540 hw.dev = &dev->dev; 540 hw.dev = &dev->dev;
541 hw.chipset = ide_pci; 541 hw.chipset = ide_pci;
@@ -763,9 +763,8 @@ static void __devexit scc_remove(struct pci_dev *dev)
763 hwif->dmatable_cpu = NULL; 763 hwif->dmatable_cpu = NULL;
764 } 764 }
765 765
766 ide_unregister(hwif->index); 766 ide_unregister(hwif);
767 767
768 hwif->chipset = ide_unknown;
769 iounmap((void*)ports->dma); 768 iounmap((void*)ports->dma);
770 iounmap((void*)ports->ctl); 769 iounmap((void*)ports->ctl);
771 pci_release_selected_regions(dev, (1 << 2) - 1); 770 pci_release_selected_regions(dev, (1 << 2) - 1);