diff options
author | James Bottomley <jejb@parisc-linux.org> | 2005-11-18 17:13:33 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2005-11-18 17:13:33 -0500 |
commit | 6593178dd46d64a5bcb0402a4f3acd95b0687abd (patch) | |
tree | 39ffacfb83efc7cbd941dc915ff00e396b371d7b /drivers/ide/ide-lib.c | |
parent | c37ea218cb43c67bf1578f5e535fcc3a751018ef (diff) |
[PATCH] ide: fix ide_toggle_bounce() to not try to bounce if we have an IOMMU
The following patch fixes a crash caused by attempting to bounce buffer
when an IDE CD-ROM is used on a machine with an IO-MMU. [At least, this
patch fixes things so I can use my IDE CD-ROM behind an ns87415 on a
HP PA-RISC workstation.]
Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index b09a6537c7a8..41d46dbe6c24 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -410,10 +410,10 @@ void ide_toggle_bounce(ide_drive_t *drive, int on) | |||
410 | { | 410 | { |
411 | u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */ | 411 | u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */ |
412 | 412 | ||
413 | if (on && drive->media == ide_disk) { | 413 | if (!PCI_DMA_BUS_IS_PHYS) { |
414 | if (!PCI_DMA_BUS_IS_PHYS) | 414 | addr = BLK_BOUNCE_ANY; |
415 | addr = BLK_BOUNCE_ANY; | 415 | } else if (on && drive->media == ide_disk) { |
416 | else if (HWIF(drive)->pci_dev) | 416 | if (HWIF(drive)->pci_dev) |
417 | addr = HWIF(drive)->pci_dev->dma_mask; | 417 | addr = HWIF(drive)->pci_dev->dma_mask; |
418 | } | 418 | } |
419 | 419 | ||