octeontx2-af: Fix truncation of smq in CN10K NIX AQ enqueue mbox handler
authorGeetha sowjanya <gakula@marvell.com>
Tue, 5 Sep 2023 06:48:16 +0000 (12:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:02 +0000 (12:28 +0200)
commite2e2c839d827d80b9b55c6b44cc24ce846e5c490
tree4c1bba45acfc15df31fab153959fb9b8d21f89e4
parente30388b80d2356dc42a748aa33903b84ecd84ad7
octeontx2-af: Fix truncation of smq in CN10K NIX AQ enqueue mbox handler

[ Upstream commit 29fe7a1b62717d58f033009874554d99d71f7d37 ]

The smq value used in the CN10K NIX AQ instruction enqueue mailbox
handler was truncated to 9-bit value from 10-bit value because of
typecasting the CN10K mbox request structure to the CN9K structure.
Though this hasn't caused any problems when programming the NIX SQ
context to the HW because the context structure is the same size.
However, this causes a problem when accessing the structure parameters.
This patch reads the right smq value for each platform.

Fixes: 30077d210c83 ("octeontx2-af: cn10k: Update NIX/NPA context structure")
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c