diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-06-12 15:33:13 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-13 16:14:52 -0400 |
commit | e6340361f9c70e84312caed98c6e058ac6234e9b (patch) | |
tree | 4c7266a523fd44a25f4f8df8df8fc18817a521da /drivers/ssb/main.c | |
parent | 6847aa5cce6e22c3625a243b02909ac46aafa110 (diff) | |
download | linux-e6340361f9c70e84312caed98c6e058ac6234e9b.tar.gz linux-e6340361f9c70e84312caed98c6e058ac6234e9b.tar.bz2 linux-e6340361f9c70e84312caed98c6e058ac6234e9b.zip |
ssb: Fix coherent DMA mask for PCI devices
This fixes setting the coherent DMA mask for PCI devices.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 7cf8851286b5..d184f2aea78d 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -1168,15 +1168,21 @@ EXPORT_SYMBOL(ssb_dma_translation); int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) { struct device *dma_dev = ssb_dev->dma_dev; + int err = 0; #ifdef CONFIG_SSB_PCIHOST - if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) - return dma_set_mask(dma_dev, mask); + if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) { + err = pci_set_dma_mask(ssb_dev->bus->host_pci, mask); + if (err) + return err; + err = pci_set_consistent_dma_mask(ssb_dev->bus->host_pci, mask); + return err; + } #endif dma_dev->coherent_dma_mask = mask; dma_dev->dma_mask = &dma_dev->coherent_dma_mask; - return 0; + return err; } EXPORT_SYMBOL(ssb_dma_set_mask); |