octeontx2-af: Unlock contexts in the queue context cache in case of fault detection
authorSuman Ghosh <sumang@marvell.com>
Tue, 7 Mar 2023 10:49:08 +0000 (16:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Mar 2023 13:06:32 +0000 (13:06 +0000)
commitea9dd2e5c6d12c8b65ce7514c8359a70eeaa0e70
treed057ca3a5e8073c1df87b041d32b381e003c53cd
parentce7ca794712f186da99719e8b4e97bd5ddbb04c3
octeontx2-af: Unlock contexts in the queue context cache in case of fault detection

NDC caches contexts of frequently used queue's (Rx and Tx queues)
contexts. Due to a HW errata when NDC detects fault/poision while
accessing contexts it could go into an illegal state where a cache
line could get locked forever. To makesure all cache lines in NDC
are available for optimum performance upon fault/lockerror/posion
errors scan through all cache lines in NDC and clear the lock bit.

Fixes: 4a3581cd5995 ("octeontx2-af: NPA AQ instruction enqueue support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h