patch 'bus/dpaa: fix channel and work queue decoding on shutdown' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:03:51 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/eae2e4cc5940b08e86754480c641aff8e989ad60

Thanks.

Kevin

---
>From eae2e4cc5940b08e86754480c641aff8e989ad60 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 | 14 ++------------
 drivers/bus/dpaa/base/qbman/qman.h | 23 ++++++++++++++++++++++-
 2 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 11d4582888..6b7f2adcf6 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -2708,12 +2708,4 @@ put_portal:
 }
 
-#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)
@@ -2802,5 +2794,4 @@ qman_shutdown_fq(u32 fqid)
 	u8 state;
 	u32 channel, wq;
-	u16 dest_wq;
 
 	DPAA_BUS_DEBUG("In shutdown for queue = %x", fqid);
@@ -2832,7 +2823,6 @@ qman_shutdown_fq(u32 fqid)
 
 	/* 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) {
diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h
index 4346d86537..079cc9f813 100644
--- a/drivers/bus/dpaa/base/qbman/qman.h
+++ b/drivers/bus/dpaa/base/qbman/qman.h
@@ -2,5 +2,5 @@
  *
  * Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2017 NXP
+ * Copyright 2017,2026 NXP
  *
  */
@@ -8,4 +8,7 @@
 #include "qman_priv.h"
 
+#define GENMASK(h, l) \
+	(((~0U) >> (sizeof(u32) * 8 - ((h) - (l) + 1))) << (l))
+
 /***************************/
 /* Portal register assists */
@@ -43,4 +46,12 @@
 #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
@@ -912,2 +923,12 @@ static inline void __qm_isr_write(struct qm_portal *portal, enum qm_isr_reg n,
 #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.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:47.850128647 +0000
+++ 0305-bus-dpaa-fix-channel-and-work-queue-decoding-on-shut.patch	2026-12-03 12:52:39.240938742 +0000
@@ -1 +1 @@
-From a46c6925bc5acd27afc416a52e3bc98579899ac2 Mon Sep 17 00:00:00 2001
+From eae2e4cc5940b08e86754480c641aff8e989ad60 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a46c6925bc5acd27afc416a52e3bc98579899ac2 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index ff56f7b1ab..25989f969f 100644
+index 11d4582888..6b7f2adcf6 100644
@@ -31 +32 @@
-@@ -2711,12 +2711,4 @@ put_portal:
+@@ -2708,12 +2708,4 @@ put_portal:
@@ -44 +45 @@
-@@ -2805,5 +2797,4 @@ qman_shutdown_fq(u32 fqid)
+@@ -2802,5 +2794,4 @@ qman_shutdown_fq(u32 fqid)
@@ -50 +51 @@
-@@ -2835,7 +2826,6 @@ qman_shutdown_fq(u32 fqid)
+@@ -2832,7 +2823,6 @@ qman_shutdown_fq(u32 fqid)
@@ -61 +62 @@
-index 43a16d1e3b..bd97689a91 100644
+index 4346d86537..079cc9f813 100644



More information about the stable mailing list