Thread (22 messages) 22 messages, 5 authors, 2017-01-28
STALE3425d
Revisions (4)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v2 current
  4. v3 [diff vs current]

[PATCH v2 12/13] wil6210: set dma mask to reflect device capability

From: Maya Erez <hidden>
Date: 2017-01-12 13:15:23
Subsystem: atheros ath generic utilities, the rest, wilocity wil6210 wireless driver · Maintainers: Jeff Johnson, Linus Torvalds

From: Hamad Kadmany <redacted>

11ad device supports 48 bit addresses, reflect that
by setting the dma mask accordingly.

Signed-off-by: Hamad Kadmany <redacted>
Signed-off-by: Maya Erez <redacted>
---
 drivers/net/wireless/ath/wil6210/pcie_bus.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c
index e891068..3a63e98 100644
--- a/drivers/net/wireless/ath/wil6210/pcie_bus.c
+++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c
@@ -205,6 +205,19 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		return -ENODEV;
 	}
 
+	/* device supports 48bit addresses */
+	rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
+	if (rc) {
+		dev_err(dev, "dma_set_mask_and_coherent(48) failed: %d\n", rc);
+		rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
+		if (rc) {
+			dev_err(dev,
+				"dma_set_mask_and_coherent(32) failed: %d\n",
+				rc);
+			return rc;
+		}
+	}
+
 	wil = wil_if_alloc(dev);
 	if (IS_ERR(wil)) {
 		rc = (int)PTR_ERR(wil);
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help