* [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks
@ 2026-12-01 4:23 Orgad Shaneh
2026-12-01 4:23 ` [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX Orgad Shaneh
2026-12-01 4:23 ` [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX Orgad Shaneh
0 siblings, 2 replies; 3+ messages in thread
From: Orgad Shaneh @ 2026-12-01 4:23 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel, Orgad Shaneh
Two places in arch/mips/cavium-octeon check for CN63XX but not for
CN66XX, which has the same units. The Cavium SDK that this code comes
from includes CN66XX in both.
1/2 sets PKO_REG_QUEUE_MODE on CN63XX and CN66XX. Without it, the PKO
on a CN66XX stopped sending under heavy load.
2/2 keeps the second MIX, TWSI and SMI in the built-in device tree on
CN66XX. Without it, /dev/i2c-1 is missing.
Both were found on a CN6635 board.
Orgad Shaneh (2):
MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX
MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX
arch/mips/cavium-octeon/executive/cvmx-pko.c | 4 +++-
arch/mips/cavium-octeon/octeon-platform.c | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX
2026-12-01 4:23 [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks Orgad Shaneh
@ 2026-12-01 4:23 ` Orgad Shaneh
2026-12-01 4:23 ` [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX Orgad Shaneh
1 sibling, 0 replies; 3+ messages in thread
From: Orgad Shaneh @ 2026-12-01 4:23 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel, Orgad Shaneh
cvmx_pko_initialize_global() sets PKO_REG_QUEUE_MODE from the number of
queues in use, but only on CN38XX, CN58XX, CN56XX and CN52XX. On CN63XX
and CN66XX the register keeps its reset value of 0. The PKO then splits
its local command storage over all 256 queues, 8 words each, however
few queues the system actually uses.
On a CN6635 (CN66XX) this breaks transmit under load. With one queue per
port shared by all cores, and the PKO freeing the sent buffers itself,
the PKO latched PKO_REG_ERROR[CURRZERO] after 3 to 15 minutes of heavy
traffic and stopped sending. A dump at that point showed an engine
holding command words from the neighbouring queue's stream, while
the command buffers in memory and the doorbell counts were correct.
With the mode set to 2 (up to 64 queues, 32 words each) the same load
ran three times for 20 minutes without an error.
The Cavium SDK that this file comes from includes CN63XX and CN66XX in
this check, with the same thresholds. Do the same here.
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
Tested on a CN6635 (CN66XX) board with a 7.3.4 kernel. The transmit
path that triggered it 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; the SDK treats it the same way.
Applies to torvalds/master and mips-next, where this file is unchanged.
An LLM helped write this patch.
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 b0199d5..b98b7e6 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)) {
int num_interfaces = cvmx_helper_get_number_of_interfaces();
int last_port =
cvmx_helper_get_last_ipd_port(num_interfaces - 1);
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX
2026-12-01 4:23 [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks Orgad Shaneh
2026-12-01 4:23 ` [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX Orgad Shaneh
@ 2026-12-01 4:23 ` Orgad Shaneh
1 sibling, 0 replies; 3+ messages in thread
From: Orgad Shaneh @ 2026-12-01 4:23 UTC (permalink / raw)
To: tsbogend; +Cc: linux-mips, linux-kernel, Orgad Shaneh
octeon_prune_device_tree() decides from the chip model how many
management ports (MIX), I2C buses (TWSI) and MDIO buses (SMI) of the
built-in device tree to keep. CN66XX has two of each, like CN63XX, but
the three model lists name only CN63XX. On a CN66XX the prune deletes
mix0, mix1, twsi1 and smi1, so /dev/i2c-1 and the second MDIO bus are
gone and no management port is probed.
The vendor SDK kernel registered two MIX ports and two MDIO buses on all
OCTEON II parts and two TWSI buses on CN63XX and CN66XX.
Add CN66XX to the three lists.
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
Tested on a CN6635 (CN66XX) board with a 7.3.7 kernel: both TWSI and
both SMI buses probe, /dev/i2c-1 is back, and mgmt0 and mgmt1 exist.
A CN6335 (CN63XX) board is unchanged.
Applies to torvalds/master and mips-next, where this file is the same.
An LLM helped write this patch.
arch/mips/cavium-octeon/octeon-platform.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index f53c983..37313dd 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -785,7 +785,8 @@ int __init octeon_prune_device_tree(void)
return -EINVAL;
}
- if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX))
+ if (OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+ OCTEON_IS_MODEL(OCTEON_CN66XX))
max_port = 2;
else if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN68XX))
max_port = 1;
@@ -831,6 +832,7 @@ int __init octeon_prune_device_tree(void)
/* I2C */
if (OCTEON_IS_MODEL(OCTEON_CN52XX) ||
OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+ OCTEON_IS_MODEL(OCTEON_CN66XX) ||
OCTEON_IS_MODEL(OCTEON_CN68XX) ||
OCTEON_IS_MODEL(OCTEON_CN56XX))
max_port = 2;
@@ -863,6 +865,7 @@ int __init octeon_prune_device_tree(void)
max_port = 4;
else if (OCTEON_IS_MODEL(OCTEON_CN52XX) ||
OCTEON_IS_MODEL(OCTEON_CN63XX) ||
+ OCTEON_IS_MODEL(OCTEON_CN66XX) ||
OCTEON_IS_MODEL(OCTEON_CN56XX))
max_port = 2;
else
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 4:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 4:23 [PATCH 0/2] MIPS: OCTEON: two CN66XX model checks Orgad Shaneh
2026-12-01 4:23 ` [PATCH 1/2] MIPS: OCTEON: set PKO_REG_QUEUE_MODE on CN63XX and CN66XX Orgad Shaneh
2026-12-01 4:23 ` [PATCH 2/2] MIPS: OCTEON: keep the second MIX, TWSI and SMI on CN66XX Orgad Shaneh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox