[PATCH net-next v3 16/17] net: ibm: emac: mal: add dcr_unmap to _remove

Rosen Penev posted 17 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH net-next v3 16/17] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Rosen Penev 1 month, 3 weeks ago
It's done in probe so it should be done here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/ibm/emac/mal.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
index 3fae1f0ec020..4f58a38f4b32 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -714,6 +714,8 @@ static void mal_remove(struct platform_device *ofdev)
 
 	free_netdev(mal->dummy_dev);
 
+	dcr_unmap(mal->dcr_host, 0x100);
+
 	dma_free_coherent(&ofdev->dev,
 			  sizeof(struct mal_descriptor) *
 				  (NUM_TX_BUFF * mal->num_tx_chans +
-- 
2.46.2
Re: [PATCH net-next v3 16/17] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Jakub Kicinski 1 month, 3 weeks ago
On Wed,  2 Oct 2024 19:11:34 -0700 Rosen Penev wrote:
> It's done in probe so it should be done here.

second done -> undone ?
Also is this not a bug fix?
Re: [PATCH net-next v3 16/17] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Rosen Penev 1 month, 3 weeks ago
On Fri, Oct 4, 2024 at 4:35 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed,  2 Oct 2024 19:11:34 -0700 Rosen Penev wrote:
> > It's done in probe so it should be done here.
>
> second done -> undone ?
> Also is this not a bug fix?
Correct. Looking at git blame dcr_unmap has never been in remove.