Skip to content

Commit

Permalink
netxen: fix dma mask update calculation
Browse files Browse the repository at this point in the history
Fix dma mask calculation that caps at 63-bit addressing even
when firmware advertises full 64-bit support.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Aug 5, 2009
1 parent 0bf52b9 commit f60f785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
change = 0;

shift = NXRD32(adapter, CRB_DMA_SHIFT);
if (shift >= 32)
if (shift > 32)
return 0;

if (NX_IS_REVISION_P3(adapter->ahw.revision_id) && (shift > 9))
Expand All @@ -272,7 +272,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
old_mask = pdev->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);
if (err)
Expand Down

0 comments on commit f60f785

Please sign in to comment.