diff options
author | Madalin Bucur <madalin.bucur@freescale.com> | 2015-01-15 16:45:24 (GMT) |
---|---|---|
committer | Madalin Bucur <madalin.bucur@freescale.com> | 2015-02-25 16:27:04 (GMT) |
commit | 7f16887b8377ec3551a151311894d64bfaec1684 (patch) | |
tree | 2e873afa7629b60c9841410f9d460aa3d35f07d9 /drivers | |
parent | bca44675a8dbcbf97653cb0c11c477262074eee0 (diff) | |
download | linux-fsl-qoriq-7f16887b8377ec3551a151311894d64bfaec1684.tar.xz |
dpaa_eth: remove Rx pool channel on unload
Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Change-Id: I2ca632118579b34a2c88ced0abb274cf20712976
Reviewed-on: http://git.am.freescale.net:8181/28552
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Marian Cristian Rotariu <marian.rotariu@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_common.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index 6ef3bdf..4167268 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -1170,6 +1170,11 @@ static void __exit __cold dpa_unload(void) dpa_debugfs_module_exit(); #endif /* CONFIG_FSL_DPAA_ETH_DEBUGFS */ + /* Only one channel is used and needs to be relased after all + * interfaces are removed + */ + dpa_release_channel(); + pr_debug(KBUILD_MODNAME ": %s:%s() ->\n", KBUILD_BASENAME".c", __func__); } diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c index 60e8d08..370381a 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c @@ -1025,6 +1025,12 @@ int dpa_get_channel(void) } EXPORT_SYMBOL(dpa_get_channel); +void dpa_release_channel(void) +{ + qman_release_pool(rx_pool_channel); +} +EXPORT_SYMBOL(dpa_release_channel); + int dpaa_eth_add_channel(void *__arg) { const cpumask_t *cpus = qman_affine_cpus(); diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.h index cabe0c9..ee1c853 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.h @@ -177,6 +177,7 @@ int dpa_fq_probe_mac(struct device *dev, struct list_head *list, bool tx_conf_fqs_per_core, enum port_type ptype); int dpa_get_channel(void); +void dpa_release_channel(void); int dpaa_eth_add_channel(void *__arg); int dpaa_eth_cgr_init(struct dpa_priv_s *priv); void dpa_fq_setup(struct dpa_priv_s *priv, const struct dpa_fq_cbs_t *fq_cbs, |