* [PATCH v4 0/2] staging: octeon: fix probe error path and pow_send_list matching
@ 2026-11-12 3:48 Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 1/2] staging: octeon: disable PKO before device removal in probe error path Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 2/2] staging: octeon: match exact interface names in pow_send_list Oscar Alejandro Sánchez Lucero via B4 Relay
0 siblings, 2 replies; 3+ messages in thread
From: Oscar Alejandro Sánchez Lucero via B4 Relay @ 2026-11-12 3:48 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-staging, linux-kernel, Oscar Alejandro Sánchez Lucero
Fixed two bugs in drivers/staging/octeon/ethernet.c:
1. Call cvmx_pko_disable() in the cvm_oct_probe() error path to match the
teardown sequence in cvm_oct_remove().
2. Split pow_send_list on commas using strsep() instead of matching
substrings with strstr().
Oscar Alejandro Sánchez Lucero (2):
staging: octeon: disable PKO before device removal in probe error path
staging: octeon: match exact interface names in pow_send_list
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
Changes in v4:
- Build tested on mips64 (cavium_octeon_defconfig) with W=1.
- Link to v3: https://lore.kernel.org/r/20261111-octeon-init-pipeline-v1-v3-0-e5581974fae4@gmail.com
---
Oscar Alejandro Sánchez Lucero (2):
staging: octeon: disable PKO before device removal in probe error path
staging: octeon: match exact interface names in pow_send_list
drivers/staging/octeon/ethernet.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20261108-octeon-init-pipeline-v1-e25ec64f49e3
Best regards,
--
Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v4 1/2] staging: octeon: disable PKO before device removal in probe error path
2026-11-12 3:48 [PATCH v4 0/2] staging: octeon: fix probe error path and pow_send_list matching Oscar Alejandro Sánchez Lucero via B4 Relay
@ 2026-11-12 3:48 ` Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 2/2] staging: octeon: match exact interface names in pow_send_list Oscar Alejandro Sánchez Lucero via B4 Relay
1 sibling, 0 replies; 3+ messages in thread
From: Oscar Alejandro Sánchez Lucero via B4 Relay @ 2026-11-12 3:48 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-staging, linux-kernel, Oscar Alejandro Sánchez Lucero
From: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
cvm_oct_remove() calls cvmx_pko_disable() before removing devices and
shutting down PKO. The err_tx error path in cvm_oct_probe() omits this
call.
Add cvmx_pko_disable() to the probe error path to match cvm_oct_remove().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
drivers/staging/octeon/ethernet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 42ec4b8324a8..c77678cb351f 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -959,6 +959,8 @@ static int cvm_oct_probe(struct platform_device *pdev)
atomic_inc_return(&cvm_oct_poll_queue_stopping);
+ cvmx_pko_disable();
+
/* Free the ethernet devices */
for (int port = 0; port < TOTAL_NUMBER_OF_PORTS; port++)
cvm_oct_remove_device(port);
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v4 2/2] staging: octeon: match exact interface names in pow_send_list
2026-11-12 3:48 [PATCH v4 0/2] staging: octeon: fix probe error path and pow_send_list matching Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 1/2] staging: octeon: disable PKO before device removal in probe error path Oscar Alejandro Sánchez Lucero via B4 Relay
@ 2026-11-12 3:48 ` Oscar Alejandro Sánchez Lucero via B4 Relay
1 sibling, 0 replies; 3+ messages in thread
From: Oscar Alejandro Sánchez Lucero via B4 Relay @ 2026-11-12 3:48 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-staging, linux-kernel, Oscar Alejandro Sánchez Lucero
From: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
cvm_oct_common_init() searches pow_send_list using strstr(), which matches
substrings instead of exact interface names.
Split a local copy of pow_send_list on comas with strsep() and compare
each entry using strcmp().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
drivers/staging/octeon/ethernet.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index c77678cb351f..653cf3727ba7 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -431,9 +431,23 @@ int cvm_oct_common_init(struct net_device *dev)
* Force the interface to use the POW send if always_use_pow
* was specified or it is in the pow send list.
*/
- if ((pow_send_group != -1) &&
- (always_use_pow || strstr(pow_send_list, dev->name)))
- priv->queue = -1;
+ if (pow_send_group != -1) {
+ if (always_use_pow) {
+ priv->queue = -1;
+ } else if (pow_send_list[0]) {
+ char list[sizeof(pow_send_list)];
+ char *p = list;
+ char *token;
+
+ strscpy(list, pow_send_list, sizeof(list));
+ while ((token = strsep(&p, ",")) != NULL) {
+ if (!strcmp(token, dev->name)) {
+ priv->queue = -1;
+ break;
+ }
+ }
+ }
+ }
if (priv->queue != -1)
dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-12 3:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 3:48 [PATCH v4 0/2] staging: octeon: fix probe error path and pow_send_list matching Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 1/2] staging: octeon: disable PKO before device removal in probe error path Oscar Alejandro Sánchez Lucero via B4 Relay
2026-11-12 3:48 ` [PATCH v4 2/2] staging: octeon: match exact interface names in pow_send_list Oscar Alejandro Sánchez Lucero via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®