diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-03-10 18:23:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:42 -0500 |
commit | 6a1961f49ee8d7339ea2454443dfc0460e0b2748 (patch) | |
tree | 057b03936a7dac1fd88d94c963bc52c3619c0022 /drivers/pci/pci.c | |
parent | e3c4bccabaf3e5c13f4b307c7737cbe8d0cecd02 (diff) |
dma-mapping: dma-mapping.h: add dma_set_coherent_mask
dma_set_coherent_mask corresponds to pci_set_consistent_dma_mask. This is
necessary to move to the generic device model DMA API from the PCI bus
specific API in the long term.
dma_set_coherent_mask works in the exact same way that
pci_set_consistent_dma_mask does. So this patch also changes
pci_set_consistent_dma_mask to call dma_set_coherent_mask.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b2d23d1b0d41..929fd3932032 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -2315,12 +2315,11 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask) | |||
2315 | int | 2315 | int |
2316 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | 2316 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) |
2317 | { | 2317 | { |
2318 | if (!pci_dma_supported(dev, mask)) | 2318 | int ret = dma_set_coherent_mask(&dev->dev, mask); |
2319 | return -EIO; | 2319 | if (ret) |
2320 | return ret; | ||
2320 | 2321 | ||
2321 | dev->dev.coherent_dma_mask = mask; | ||
2322 | dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask)); | 2322 | dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask)); |
2323 | |||
2324 | return 0; | 2323 | return 0; |
2325 | } | 2324 | } |
2326 | #endif | 2325 | #endif |