RE: [PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
From: Keller, Jacob E
Date: Mon Oct 07 2024 - 18:30:58 EST
> -----Original Message-----
> From: Rosen Penev <rosenp@xxxxxxxxx>
> Sent: Monday, October 7, 2024 1:39 PM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: andrew@xxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx;
> kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Keller,
> Jacob E <jacob.e.keller@xxxxxxxxx>; horms@xxxxxxxxxx; sd@xxxxxxxxxxxxxxx;
> chunkeey@xxxxxxxxx
> Subject: [PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
>
> It's done in probe so it should be done in remove.
>
> Fixes: 1ff0fcfcb1a6 ("ibm_newemac: Fix new MAL feature handling")
>
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---
> 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 1e1860ddc363..b1a32070f03a 100644
> --- a/drivers/net/ethernet/ibm/emac/mal.c
> +++ b/drivers/net/ethernet/ibm/emac/mal.c
> @@ -715,6 +715,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
Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>