* [PATCH v2 0/2] dpaa2: fix error propagation in remove path
@ 2026-05-16 11:08 Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success Md Shofiqul Islam
0 siblings, 2 replies; 3+ messages in thread
From: Md Shofiqul Islam @ 2026-05-16 11:08 UTC (permalink / raw)
To: dev; +Cc: hemant.agrawal, stable
This series fixes two bugs in the dpaa2/fslmc device removal path where
error codes were silently discarded, making it impossible for callers to
detect removal failures.
Patch 1 fixes fslmc_bus_unplug() to capture and propagate the return
value of drv->remove() instead of ignoring it.
Patch 2 fixes dpaa2_qdma_remove() to return the actual error code from
rte_dma_pmd_release() instead of unconditionally returning 0.
v2:
- bus/fslmc: use 'if (ret != 0)' style per DPDK coding standard
Md Shofiqul Islam (2):
bus/fslmc: fix ignored return value in fslmc_bus_unplug
dma/dpaa2: fix dpaa2_qdma_remove always returning success
drivers/bus/fslmc/fslmc_bus.c | 4 +++-
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.51.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug
2026-05-16 11:08 [PATCH v2 0/2] dpaa2: fix error propagation in remove path Md Shofiqul Islam
@ 2026-05-16 11:08 ` Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success Md Shofiqul Islam
1 sibling, 0 replies; 3+ messages in thread
From: Md Shofiqul Islam @ 2026-05-16 11:08 UTC (permalink / raw)
To: dev; +Cc: hemant.agrawal, stable
fslmc_bus_unplug() called drv->remove() and discarded the return value,
unconditionally clearing driver references and reporting success even
when the remove callback signalled failure. As a result, callers had
no way to detect or react to removal errors.
Capture the return value and propagate it to the caller. Only clear
the driver references and log successful unplug when the callback
returns zero.
Fixes: b5721f271cbf ("bus/fslmc: support DPNI hotplug")
Bugzilla ID: 1914
Cc: hemant.agrawal@nxp.com
Cc: stable@dpdk.org
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
drivers/bus/fslmc/fslmc_bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index cf881b3eec..57bb61dc35 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -620,7 +620,9 @@ fslmc_bus_unplug(struct rte_device *rte_dev)
struct rte_dpaa2_driver *drv = dev->driver;
if (drv && drv->remove) {
- drv->remove(dev);
+ int ret = drv->remove(dev);
+ if (ret != 0)
+ return ret;
dev->driver = NULL;
dev->device.driver = NULL;
DPAA2_BUS_INFO("%s Un-Plugged", dev->device.name);
--
2.51.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success
2026-05-16 11:08 [PATCH v2 0/2] dpaa2: fix error propagation in remove path Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug Md Shofiqul Islam
@ 2026-05-16 11:08 ` Md Shofiqul Islam
1 sibling, 0 replies; 3+ messages in thread
From: Md Shofiqul Islam @ 2026-05-16 11:08 UTC (permalink / raw)
To: dev; +Cc: hemant.agrawal, stable
dpaa2_qdma_remove() checked the return value of rte_dma_pmd_release()
and logged an error on failure, but then unconditionally returned 0,
hiding the failure from fslmc_bus_unplug() and any higher-level
caller. A device-cleanup failure was silently swallowed.
Return the actual error code so that callers can detect and handle
removal failures correctly.
Fixes: 8caf8427f85a ("dma/dpaa2: introduce driver skeleton")
Bugzilla ID: 1914
Cc: hemant.agrawal@nxp.com
Cc: stable@dpdk.org
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
---
drivers/dma/dpaa2/dpaa2_qdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dpaa2/dpaa2_qdma.c b/drivers/dma/dpaa2/dpaa2_qdma.c
index beca464c72..f7d94bb799 100644
--- a/drivers/dma/dpaa2/dpaa2_qdma.c
+++ b/drivers/dma/dpaa2/dpaa2_qdma.c
@@ -1739,7 +1739,7 @@ dpaa2_qdma_remove(struct rte_dpaa2_device *dpaa2_dev)
if (ret)
DPAA2_QDMA_ERR("Device cleanup failed");
- return 0;
+ return ret;
}
static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd;
--
2.51.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-17 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 11:08 [PATCH v2 0/2] dpaa2: fix error propagation in remove path Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 1/2] bus/fslmc: fix ignored return value in fslmc_bus_unplug Md Shofiqul Islam
2026-05-16 11:08 ` [PATCH v2 2/2] dma/dpaa2: fix dpaa2_qdma_remove always returning success Md Shofiqul Islam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox