patch 'bus/dpaa: fix channel and work queue decoding on shutdown' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:42:39 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/07/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dab25efe385d6f8eaddde020cf48abfaac148229
Thanks.
Luca Boccassi
---
>From dab25efe385d6f8eaddde020cf48abfaac148229 Mon Sep 17 00:00:00 2001
From: Prashant Gupta <prashant.gupta_3 at nxp.com>
Date: Fri, 16 Oct 2026 16:49:38 +0530
Subject: [PATCH] bus/dpaa: fix channel and work queue decoding on shutdown
[ upstream commit a46c6925bc5acd27afc416a52e3bc98579899ac2 ]
qman_shutdown_fq() decoded the FQD dest_wq field as:
channel = dest_wq & 0x7;
wq = dest_wq >> 3;
but in the hardware descriptor the work queue is bits 2:0 and the
channel is bits 15:3. The old code therefore extracted a 0-7 value as
the channel and the real channel as the work queue. qman_shutdown_fq()
compares the channel against the pool-channel range to decide how to
drain the queue, and that comparison can never succeed with a 0-7
value, so pool-channel FQs were not drained correctly on shutdown.
Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")
Signed-off-by: Prashant Gupta <prashant.gupta_3 at nxp.com>
---
drivers/bus/dpaa/base/qbman/qman.c | 6 ++----
drivers/bus/dpaa/base/qbman/qman.h | 23 ++++++++++++++++++++++-
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index efc0e809a2d..d8830a70023 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2669,7 +2669,6 @@ int qman_shutdown_fq(u32 fqid)
int orl_empty, fq_empty, drain = 0;
u32 result;
u32 channel, wq;
- u16 dest_wq;
p = get_affine_portal();
low_p = &p->p;
@@ -2694,9 +2693,8 @@ int qman_shutdown_fq(u32 fqid)
DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ);
/* Need to store these since the MCR gets reused */
- dest_wq = be16_to_cpu(mcr->queryfq.fqd.dest_wq);
- channel = dest_wq & 0x7;
- wq = dest_wq >> 3;
+ channel = qm_fqd_get_chan(&mcr->queryfq.fqd);
+ wq = qm_fqd_get_wq(&mcr->queryfq.fqd);
switch (state) {
case QM_MCR_NP_STATE_TEN_SCHED:
diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h
index 4346d86537a..079cc9f813a 100644
--- a/drivers/bus/dpaa/base/qbman/qman.h
+++ b/drivers/bus/dpaa/base/qbman/qman.h
@@ -1,12 +1,15 @@
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2017 NXP
+ * Copyright 2017,2026 NXP
*
*/
#include "qman_priv.h"
+#define GENMASK(h, l) \
+ (((~0U) >> (sizeof(u32) * 8 - ((h) - (l) + 1))) << (l))
+
/***************************/
/* Portal register assists */
/***************************/
@@ -42,6 +45,14 @@
#define QM_CL_RR0 0x3900
#define QM_CL_RR1 0x3940
+#define QM_FQD_CHAN_OFF 3
+#define QM_FQD_WQ_MASK GENMASK(2, 0)
+/* 'fqid' is a 24-bit field in every h/w descriptor */
+#define QM_FQID_MASK GENMASK(23, 0)
+
+#define qm_fqid_set(p, v) ((p)->fqid = cpu_to_be32((v) & QM_FQID_MASK))
+#define qm_fqid_get(p) (be32_to_cpu((p)->fqid) & QM_FQID_MASK)
+
/* BTW, the drivers (and h/w programming model) already obtain the required
* synchronisation for portal accesses via lwsync(), hwsync(), and
* data-dependencies. Use of barrier()s or other order-preserving primitives
@@ -911,3 +922,13 @@ static inline void __qm_isr_write(struct qm_portal *portal, enum qm_isr_reg n,
__qm_out(&portal->addr, QM_REG_ISR + (n << 2), val);
#endif
}
+
+static inline int qm_fqd_get_chan(const struct qm_fqd *fqd)
+{
+ return be16_to_cpu(fqd->dest_wq) >> QM_FQD_CHAN_OFF;
+}
+
+static inline int qm_fqd_get_wq(const struct qm_fqd *fqd)
+{
+ return be16_to_cpu(fqd->dest_wq) & QM_FQD_WQ_MASK;
+}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:47.714997554 +0000
+++ 0072-bus-dpaa-fix-channel-and-work-queue-decoding-on-shut.patch 2026-11-05 16:42:45.005063297 +0000
@@ -1 +1 @@
-From a46c6925bc5acd27afc416a52e3bc98579899ac2 Mon Sep 17 00:00:00 2001
+From dab25efe385d6f8eaddde020cf48abfaac148229 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a46c6925bc5acd27afc416a52e3bc98579899ac2 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
- drivers/bus/dpaa/base/qbman/qman.c | 14 ++------------
+ drivers/bus/dpaa/base/qbman/qman.c | 6 ++----
@@ -25 +26 @@
- 2 files changed, 24 insertions(+), 13 deletions(-)
+ 2 files changed, 24 insertions(+), 5 deletions(-)
@@ -28 +29 @@
-index ff56f7b1ab9..25989f969f5 100644
+index efc0e809a2d..d8830a70023 100644
@@ -31,18 +32,3 @@
-@@ -2710,14 +2710,6 @@ put_portal:
- return ret;
- }
-
--#define GENMASK(h, l) \
-- (((~0U) >> (sizeof(unsigned int) * 8 - ((h) - (l) + 1))) << (l))
--
--/* 'fqid' is a 24-bit field in every h/w descriptor */
--#define QM_FQID_MASK GENMASK(23, 0)
--#define qm_fqid_set(p, v) ((p)->fqid = cpu_to_be32((v) & QM_FQID_MASK))
--#define qm_fqid_get(p) (be32_to_cpu((p)->fqid) & QM_FQID_MASK)
--
- static int
- _qm_mr_consume_and_match_verb(struct qm_portal *p, int v)
- {
-@@ -2804,7 +2796,6 @@ qman_shutdown_fq(u32 fqid)
- u32 res;
- u8 state;
+@@ -2669,7 +2669,6 @@ int qman_shutdown_fq(u32 fqid)
+ int orl_empty, fq_empty, drain = 0;
+ u32 result;
@@ -52 +37,0 @@
- DPAA_BUS_DEBUG("In shutdown for queue = %x", fqid);
@@ -54,2 +39,3 @@
-@@ -2834,9 +2825,8 @@ qman_shutdown_fq(u32 fqid)
- }
+ low_p = &p->p;
+@@ -2694,9 +2693,8 @@ int qman_shutdown_fq(u32 fqid)
+ DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ);
@@ -67 +53 @@
-index 43a16d1e3b9..bd97689a91f 100644
+index 4346d86537a..079cc9f813a 100644
@@ -71 +57 @@
- /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
+ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
More information about the stable
mailing list