From: Jun Yang <[email protected]> ShareMAC port is still alive after dpdk process quits but RXQ setup in dpdk process is in invalid state. If high loading ingress traffic hits the FMan PCD then it's en-queued to the RXQ to generate frequent interrupts. This causes system stuck. User can disable this kind of interrupt by env to avoid this issue: export DPAA_QMAN_IESR_ISR_DISABLE=1
Signed-off-by: Jun Yang <[email protected]> --- drivers/bus/dpaa/base/qbman/qman_driver.c | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index cdce6b777b..dc84260731 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) * * Copyright 2008-2016 Freescale Semiconductor Inc. - * Copyright 2017-2022 NXP + * Copyright 2017-2022, 2025 NXP * */ @@ -32,6 +32,29 @@ static __thread struct dpaa_ioctl_portal_map map = { .type = dpaa_portal_qman }; +#define REG_ERR_IER 0x0e04 +#define QM_EIRQ_IESI 0x00000004 + +static void dpaa_qm_iesr_irq_control(void) +{ + char *env = getenv("DPAA_QMAN_IESR_ISR_DISABLE"); + uint32_t val; + + if (!qman_ccsr_map) { + pr_err("qman CCSR not mapped!\n"); + return; + } + + val = in_be32((void *)((uintptr_t)qman_ccsr_map + REG_ERR_IER)); + + if (!env || atoi(env) == 0) + val = val | QM_EIRQ_IESI; + else + val = val & (~((uint32_t)QM_EIRQ_IESI)); + + out_be32((void *)((uintptr_t)qman_ccsr_map + REG_ERR_IER), val); +} + u16 dpaa_get_qm_channel_caam(void) { return qm_channel_caam; @@ -343,6 +366,8 @@ int qman_global_init(void) return -EINVAL; } + dpaa_qm_iesr_irq_control(); + clk = of_get_property(dt_node, "clock-frequency", NULL); if (!clk) pr_warn("Can't find Qman clock frequency\n"); -- 2.25.1

