Skip to content

Commit 1b0c84a

Browse files
wanghuanhuan12davem330
authored andcommitted
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: 484963c ("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]>
1 parent e0c8bcc commit 1b0c84a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2509,7 +2509,7 @@ static int nfp_net_read_caps(struct nfp_net *nn)
25092509
{
25102510
/* Get some of the read-only fields from the BAR */
25112511
nn->cap = nn_readl(nn, NFP_NET_CFG_CAP);
2512-
nn->cap_w1 = nn_readq(nn, NFP_NET_CFG_CAP_WORD1);
2512+
nn->cap_w1 = nn_readl(nn, NFP_NET_CFG_CAP_WORD1);
25132513
nn->max_mtu = nn_readl(nn, NFP_NET_CFG_MAX_MTU);
25142514

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

0 commit comments

Comments
 (0)