]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfp: use correct macro for LengthSelect in BAR config
authorDaniel Basilio <daniel.basilio@corigine.com>
Fri, 2 Feb 2024 11:37:17 +0000 (13:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:11 +0000 (09:25 +0100)
commit0bb84600c23c1d81bdbffb66d6ac36c25b56ad73
tree9054ae0a32dff7407f86943530bfcfd112580c00
parent9c82920359b7c1eddaf72069bcfe0ffddf088cd0
nfp: use correct macro for LengthSelect in BAR config

commit b3d4f7f2288901ed2392695919b3c0e24c1b4084 upstream.

The 1st and 2nd expansion BAR configuration registers are configured,
when the driver starts up, in variables 'barcfg_msix_general' and
'barcfg_msix_xpb', respectively. The 'LengthSelect' field is ORed in
from bit 0, which is incorrect. The 'LengthSelect' field should
start from bit 27.

This has largely gone un-noticed because
NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT happens to be 0.

Fixes: 4cb584e0ee7d ("nfp: add CPP access core")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Daniel Basilio <daniel.basilio@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c