summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Machon <daniel.machon@microchip.com>2024-09-02 16:54:11 +0200
committerDavid S. Miller <davem@davemloft.net>2024-09-04 12:53:50 +0200
commit6647f2fd8df056d2bc7c74e25469388ad375d98d (patch)
treef093c70d9d9c2384b58e2bfcef08223aac615a80
parentnet: sparx5: use FDMA library for adding DCB's in the rx path (diff)
downloadlinux-6647f2fd8df056d2bc7c74e25469388ad375d98d.tar.xz
linux-6647f2fd8df056d2bc7c74e25469388ad375d98d.zip
net: sparx5: use library helper for freeing rx buffers
The library has the helper fdma_free_phys() for freeing physical FDMA memory. Use it in the exit path. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
index 122876136f75..d01516f32d0c 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
@@ -523,5 +523,6 @@ int sparx5_fdma_stop(struct sparx5 *sparx5)
read_poll_timeout(sparx5_fdma_port_ctrl, val,
FDMA_PORT_CTRL_XTR_BUF_IS_EMPTY_GET(val) == 0,
500, 10000, 0, sparx5);
+ fdma_free_phys(&sparx5->rx.fdma);
return 0;
}