]> 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 07:42:28 +0000 (08:42 +0100)
commit962091c40813ac533ba303948b95b4d28619e778
treebc2717639760ae090cb1f6692b6b4604abf2c744
parent58054faf3bd29cd0b949b77efcb6157f66f401ed
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