[PATCH v2 2/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX
From: Orgad Shaneh
Date: Wed Dec 02 2026 - 08:15:29 EST
cvmx_pko_initialize_global() sets PKO_REG_QUEUE_MODE only on CN38XX,
CN58XX, CN56XX and CN52XX. On CN63XX and CN66XX it stays 0, and the PKO
splits its local command storage over all 256 queues, 8 words each.
On a CN6635 (CN66XX) the PKO then latched PKO_REG_ERROR[CURRZERO] after
3 to 15 minutes of heavy traffic and stopped sending. With mode 2 (64
queues, 32 words each) the same load ran clean.
The Cavium SDK sets the mode on these chips too, with the same
thresholds.
This needs the previous patch: on CN66XX the last interface has no IPD
port, so the old count would be negative.
Signed-off-by: Orgad Shaneh <orgads@xxxxxxxxx>
---
v2:
- The queue count fix is now the previous patch.
- Shorter commit message.
- v1 was 1/2 of a series with an unrelated device-tree fix, which is
now sent on its own:
https://lore.kernel.org/r/20261201042313.3010724-2-orgads@xxxxxxxxx
Tested on a CN6635 (CN66XX) board with a 7.3.7 kernel, both patches
applied: the register reads 2, as with v1. With 8 queues per port on
interfaces 0 and 1 (72 queues, a local change) it reads 1, and the load
ran clean. The transmit path that triggered the hang is ours, out of
tree: it hands buffers to the PKO to free, which mainline's
octeon-ethernet does only when it reuses skbs. CN63XX is by inspection
only.
arch/mips/cavium-octeon/executive/cvmx-pko.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c
index b1b0a8a985d9..6fd5c3a924e5 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-pko.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c
@@ -208,7 +208,9 @@ void cvmx_pko_initialize_global(void)
*/
if (OCTEON_IS_MODEL(OCTEON_CN38XX) || OCTEON_IS_MODEL(OCTEON_CN58XX)
|| OCTEON_IS_MODEL(OCTEON_CN56XX)
- || OCTEON_IS_MODEL(OCTEON_CN52XX)) {
+ || OCTEON_IS_MODEL(OCTEON_CN52XX)
+ || OCTEON_IS_MODEL(OCTEON_CN63XX)
+ || OCTEON_IS_MODEL(OCTEON_CN66XX)) {
/*
* This runs before the interfaces are probed, so their
* port counts are still zero here. The queue numbers come
--
2.53.0