When running dpdk congiguration script dpdk_configure_1028ardb.sh
to setup dpdk work environment, the fsl_enetc driver is unbound. But
the CBS structure is not released in enetc_tsn_deinit() function. So, add
a function enetc_cbs_free() to free CBS structure.

Signed-off-by: Meng Li <meng...@windriver.com>
---
 drivers/net/ethernet/freescale/enetc/enetc_tsn.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_tsn.c 
b/drivers/net/ethernet/freescale/enetc/enetc_tsn.c
index 3bf1669792a0..766913c85a0d 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_tsn.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_tsn.c
@@ -1840,6 +1840,12 @@ static void enetc_cbs_init(struct enetc_si *si)
        }
 }
 
+static void enetc_cbs_free(struct enetc_si *si)
+{
+       kfree(si->ecbs);
+       si->ecbs = NULL;
+}
+
 static void enetc_qbv_init(struct enetc_hw *hw)
 {
        /* Set PSPEED to be 1Gbps */
@@ -1880,6 +1886,9 @@ static void enetc_tsn_deinit(struct net_device *ndev)
        if (capability & TSN_CAP_QCI)
                enetc_qci_disable(&si->hw);
 
+       if (capability & TSN_CAP_CBS)
+               enetc_cbs_free(si);
+
        dev_info(&si->pdev->dev, "%s: release\n", __func__);
 }
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13000): 
https://lists.yoctoproject.org/g/linux-yocto/message/13000
Mute This Topic: https://lists.yoctoproject.org/mt/100866536/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to