Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548365
| From | Nikita Yushchenko <nikita.yoush@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] rcar-pcie: set host bridge's DMA mask |
| Date | 2016-12-29 21:50 +0100 |
| Message-ID | <sTPO9-2Zl-1@gated-at.bofh.it> (permalink) |
| References | <sTPO9-2Zl-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This gives platform DMA mapping code a chance to disallow setting device
DMA mask to something that host bridge can't support.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
drivers/pci/host/pcie-rcar.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index aca85be..b1edc3c 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -451,6 +451,7 @@ static int rcar_pcie_enable(struct rcar_pcie *pcie)
{
struct device *dev = pcie->dev;
struct pci_bus *bus, *child;
+ struct pci_host_bridge *bridge;
LIST_HEAD(res);
/* Try setting 5 GT/s link speed */
@@ -480,6 +481,10 @@ static int rcar_pcie_enable(struct rcar_pcie *pcie)
list_for_each_entry(child, &bus->children, node)
pcie_bus_configure_settings(child);
+ bridge = pci_find_host_bridge(bus);
+ bridge->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ bridge->dev.dma_mask = &bridge->dev.coherent_dma_mask;
+
pci_bus_add_devices(bus);
return 0;
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2016-12-29 21:50 +0100
[PATCH 2/2] rcar-pcie: set host bridge's DMA mask Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2016-12-29 21:50 +0100
Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-12-30 10:50 +0100
Re: [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-12-30 11:10 +0100
csiph-web