aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuanhuan Wang <[email protected]>2022-12-16 15:31:01 +0100
committerDavid S. Miller <[email protected]>2022-12-19 12:35:20 +0000
commit1b0c84a32e37cf85d552261005091eb695313f38 (patch)
tree5d8c6b70e8b45902b2ea6b9f6b531874e83f05db
parente0c8bccd40fc1c19e1d246c39bcf79e357e1ada3 (diff)
nfp: fix unaligned io read of capabilities word
The address of 32-bit extend capability is not qword aligned, and may cause exception in some arch. Fixes: 484963ce9f1e ("nfp: extend capability and control words") Signed-off-by: Huanhuan Wang <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 2314cf55e821..09053373288f 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -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