Skip to content

Commit

Permalink
nfp: fix unaligned io read of capabilities word
Browse files Browse the repository at this point in the history
The address of 32-bit extend capability is not qword aligned,
and may cause exception in some arch.

Fixes: 484963c ("nfp: extend capability and control words")
Signed-off-by: Huanhuan Wang <huanhuan.wang@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Huanhuan Wang authored and David S. Miller committed Dec 19, 2022
1 parent e0c8bcc commit 1b0c84a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2509,7 +2509,7 @@ static int nfp_net_read_caps(struct nfp_net *nn)
{
/* Get some of the read-only fields from the BAR */
nn->cap = nn_readl(nn, NFP_NET_CFG_CAP);
nn->cap_w1 = nn_readq(nn, NFP_NET_CFG_CAP_WORD1);
nn->cap_w1 = nn_readl(nn, NFP_NET_CFG_CAP_WORD1);
nn->max_mtu = nn_readl(nn, NFP_NET_CFG_MAX_MTU);

/* ABI 4.x and ctrl vNIC always use chained metadata, in other cases
Expand Down

0 comments on commit 1b0c84a

Please sign in to comment.