Skip to contentSkip to conversation

i2c: thunderx: Set DMA mask

RFC PATCH New Paul Cercueil 1 participant 1 message Oct 28 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

RFC PATCH 3/4 i2c: thunderx: Set DMA mask

From: Tanmay Jagdale <[email protected]>

Without it, MSI-X initialization can fail.

Fixes 4c21541d8da1 ("i2c: thunderx: Replace pci_enable_msix()")
---
 drivers/i2c/busses/i2c-thunderx-pcidrv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/i2c/busses/i2c-thunderx-pcidrv.c +4 -0
index 3959f23fc440..2208337e649b 100644
@@ -198,6 +198,10 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
 	i2c->hlc_int_enable = thunder_i2c_hlc_int_enable;
 	i2c->hlc_int_disable = thunder_i2c_hlc_int_disable;
 
+	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
+	if (ret < 0)
+		goto error;
+
 	ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX);
 	if (ret < 0)
 		goto error;
Signature · 1 line
2.47.3