summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2009-08-04 10:39:03 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-05 10:21:58 -0700
commitf60f785679b507cbeeb03d2db080ab649ac86027 (patch)
treeee8d873ccdaaa9092359db79f949bfd1bf8fbfbe
parent0bf52b981770cbf006323bab5177f2858a196766 (diff)
downloadlinux-3.10-f60f785679b507cbeeb03d2db080ab649ac86027.tar.gz
linux-3.10-f60f785679b507cbeeb03d2db080ab649ac86027.tar.bz2
linux-3.10-f60f785679b507cbeeb03d2db080ab649ac86027.zip
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: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/netxen/netxen_nic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 3cd8cfcf627..70c05c4c0ca 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -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))
@@ -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)