Commit f60f7856 authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller

netxen: fix dma mask update calculation

Fix dma mask calculation that caps at 63-bit addressing even
when firmware advertises full 64-bit support.
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0bf52b98
...@@ -260,7 +260,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter) ...@@ -260,7 +260,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
change = 0; change = 0;
shift = NXRD32(adapter, CRB_DMA_SHIFT); shift = NXRD32(adapter, CRB_DMA_SHIFT);
if (shift >= 32) if (shift > 32)
return 0; return 0;
if (NX_IS_REVISION_P3(adapter->ahw.revision_id) && (shift > 9)) if (NX_IS_REVISION_P3(adapter->ahw.revision_id) && (shift > 9))
...@@ -272,7 +272,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter) ...@@ -272,7 +272,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
old_mask = pdev->dma_mask; old_mask = pdev->dma_mask;
old_cmask = pdev->dev.coherent_dma_mask; old_cmask = pdev->dev.coherent_dma_mask;
mask = (1ULL<<(32+shift)) - 1; mask = DMA_BIT_MASK(32+shift);
err = pci_set_dma_mask(pdev, mask); err = pci_set_dma_mask(pdev, mask);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment