mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
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>
This commit is contained in:
parent
6847aa5cce
commit
e6340361f9
@ -1168,15 +1168,21 @@ EXPORT_SYMBOL(ssb_dma_translation);
|
|||||||
int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
|
int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
|
||||||
{
|
{
|
||||||
struct device *dma_dev = ssb_dev->dma_dev;
|
struct device *dma_dev = ssb_dev->dma_dev;
|
||||||
|
int err = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_SSB_PCIHOST
|
#ifdef CONFIG_SSB_PCIHOST
|
||||||
if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
|
if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) {
|
||||||
return dma_set_mask(dma_dev, mask);
|
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
|
#endif
|
||||||
dma_dev->coherent_dma_mask = mask;
|
dma_dev->coherent_dma_mask = mask;
|
||||||
dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
|
dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
|
||||||
|
|
||||||
return 0;
|
return err;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ssb_dma_set_mask);
|
EXPORT_SYMBOL(ssb_dma_set_mask);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user