Skip to contentSkip to conversation

nvme-pci: don't fall back to a 32-bit DMA mask

PATCH New Christoph Hellwig 2 participants 2 messages Jun 28, 2019 – Jul 2, 2019 NVMe

lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 nvme-pci: don't fall back to a 32-bit DMA mask

Since Linux 5.0 drivers can safely set the largest DMA mask supported by the device, and don't need fallbacks to work around the dma mapping implementations.

Signed-off-by Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/pci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/nvme/host/pci.c +1 -2
index f50013369cc5..49c1fc9907a6 100644
@@ -2289,8 +2289,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
 
 	pci_set_master(pdev);
 
-	if (dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(64)) &&
-	    dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(32)))
+	if (dma_set_mask_and_coherent(dev->dev, DMA_BIT_MASK(64)))
 		goto disable;
 
 	if (readl(dev->bar + NVME_REG_CSTS) == -1) {
Signature · 1 line
2.20.1
maintainer
#1 lore raw

PATCH 1/1 nvme-pci: don't fall back to a 32-bit DMA mask

Reviewed-by Sagi Grimberg <sagi at grimberg.me>