diff options
Diffstat (limited to 'arch/parisc/kernel/pci-dma.c')
-rw-r--r-- | arch/parisc/kernel/pci-dma.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index df47895db828..7d927eac932b 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -447,10 +447,7 @@ static void pa11_dma_free_consistent (struct device *dev, size_t size, void *vad | |||
447 | 447 | ||
448 | static dma_addr_t pa11_dma_map_single(struct device *dev, void *addr, size_t size, enum dma_data_direction direction) | 448 | static dma_addr_t pa11_dma_map_single(struct device *dev, void *addr, size_t size, enum dma_data_direction direction) |
449 | { | 449 | { |
450 | if (direction == DMA_NONE) { | 450 | BUG_ON(direction == DMA_NONE); |
451 | printk(KERN_ERR "pa11_dma_map_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0)); | ||
452 | BUG(); | ||
453 | } | ||
454 | 451 | ||
455 | flush_kernel_dcache_range((unsigned long) addr, size); | 452 | flush_kernel_dcache_range((unsigned long) addr, size); |
456 | return virt_to_phys(addr); | 453 | return virt_to_phys(addr); |
@@ -458,10 +455,7 @@ static dma_addr_t pa11_dma_map_single(struct device *dev, void *addr, size_t siz | |||
458 | 455 | ||
459 | static void pa11_dma_unmap_single(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) | 456 | static void pa11_dma_unmap_single(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) |
460 | { | 457 | { |
461 | if (direction == DMA_NONE) { | 458 | BUG_ON(direction == DMA_NONE); |
462 | printk(KERN_ERR "pa11_dma_unmap_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0)); | ||
463 | BUG(); | ||
464 | } | ||
465 | 459 | ||
466 | if (direction == DMA_TO_DEVICE) | 460 | if (direction == DMA_TO_DEVICE) |
467 | return; | 461 | return; |
@@ -480,8 +474,7 @@ static int pa11_dma_map_sg(struct device *dev, struct scatterlist *sglist, int n | |||
480 | { | 474 | { |
481 | int i; | 475 | int i; |
482 | 476 | ||
483 | if (direction == DMA_NONE) | 477 | BUG_ON(direction == DMA_NONE); |
484 | BUG(); | ||
485 | 478 | ||
486 | for (i = 0; i < nents; i++, sglist++ ) { | 479 | for (i = 0; i < nents; i++, sglist++ ) { |
487 | unsigned long vaddr = sg_virt_addr(sglist); | 480 | unsigned long vaddr = sg_virt_addr(sglist); |
@@ -496,8 +489,7 @@ static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in | |||
496 | { | 489 | { |
497 | int i; | 490 | int i; |
498 | 491 | ||
499 | if (direction == DMA_NONE) | 492 | BUG_ON(direction == DMA_NONE); |
500 | BUG(); | ||
501 | 493 | ||
502 | if (direction == DMA_TO_DEVICE) | 494 | if (direction == DMA_TO_DEVICE) |
503 | return; | 495 | return; |
@@ -511,16 +503,14 @@ static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, in | |||
511 | 503 | ||
512 | static void pa11_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction) | 504 | static void pa11_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction) |
513 | { | 505 | { |
514 | if (direction == DMA_NONE) | 506 | BUG_ON(direction == DMA_NONE); |
515 | BUG(); | ||
516 | 507 | ||
517 | flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size); | 508 | flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size); |
518 | } | 509 | } |
519 | 510 | ||
520 | static void pa11_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction) | 511 | static void pa11_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction) |
521 | { | 512 | { |
522 | if (direction == DMA_NONE) | 513 | BUG_ON(direction == DMA_NONE); |
523 | BUG(); | ||
524 | 514 | ||
525 | flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size); | 515 | flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size); |
526 | } | 516 | } |