diff options
author | Robert Richter <rrichter@cavium.com> | 2015-06-02 21:00:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-02 22:49:26 +0300 |
commit | d768b678a8d9c572ad3c2c6ba71d9e7029b867a2 (patch) | |
tree | e8c5f6e3226756e0e69c1001bb8090f14e4ca22b /drivers/net/ethernet/cavium/thunder/thunder_bgx.c | |
parent | dda922c831d1661c11a3ae1051b7160236f6ffb0 (diff) | |
download | linux-d768b678a8d9c572ad3c2c6ba71d9e7029b867a2.tar.xz |
net: thunderx: Cleanup duplicate NODE_ID macros, add nic_get_node_id()
There are duplicate NODE_ID macro definitions. Move all of them to
nic.h for usage in nic and bgx driver and introduce nic_get_node_id()
helper function.
This patch also fixes 64bit mask which should have been ULL by
reworking the node calculation.
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/thunder_bgx.c')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 020e11cf3fdd..cde604a93d5d 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -894,8 +894,8 @@ static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_release_regions; } bgx->bgx_id = (pci_resource_start(pdev, PCI_CFG_REG_BAR_NUM) >> 24) & 1; - bgx->bgx_id += NODE_ID(pci_resource_start(pdev, PCI_CFG_REG_BAR_NUM)) - * MAX_BGX_PER_CN88XX; + bgx->bgx_id += nic_get_node_id(pdev) * MAX_BGX_PER_CN88XX; + bgx_vnic[bgx->bgx_id] = bgx; bgx_get_qlm_mode(bgx); |