summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorEdwin Peer <edwin.peer@netronome.com>2018-02-02 06:41:43 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-03 03:08:20 +0300
commit1d8ef0c07664dc48f2ff19a90b62dd3f6f425547 (patch)
tree08c03e996a2b984f90e358f54fd7bf30c75de89a /drivers/net/ethernet
parent743ffffefac1c670c6618742c923f6275d819604 (diff)
downloadlinux-1d8ef0c07664dc48f2ff19a90b62dd3f6f425547.tar.xz
nfp: fix TLV offset calculation
The data pointer in the config space TLV parser already includes NFP_NET_CFG_TLV_BASE, it should not be added again. Incorrect offset values were only used in printed user output, rendering the bug merely cosmetic. Fixes: 73a0329b057e ("nfp: add TLV capabilities to the BAR") Signed-off-by: Edwin Peer <edwin.peer@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c
index ffb402746ad4..1f9149bb2ae6 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.c
@@ -65,7 +65,7 @@ int nfp_net_tlv_caps_parse(struct device *dev, u8 __iomem *ctrl_mem,
u32 hdr = readl(data);
length = FIELD_GET(NFP_NET_CFG_TLV_HEADER_LENGTH, hdr);
- offset = data - ctrl_mem + NFP_NET_CFG_TLV_BASE;
+ offset = data - ctrl_mem;
/* Advance past the header */
data += 4;