[PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove

Rosen Penev posted 1 patch 1 month, 2 weeks ago
There is a newer version of this series
drivers/net/ethernet/ibm/emac/mal.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Rosen Penev 1 month, 2 weeks ago
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@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 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
Re: [PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Jakub Kicinski 1 month, 2 weeks ago
On Mon,  7 Oct 2024 13:39:23 -0700 Rosen Penev wrote:
> Fixes: 1ff0fcfcb1a6 ("ibm_newemac: Fix new MAL feature handling")
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

I'll fix this one when applying but please make sure there is no empty
lines between tags in the future.
Re: [PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Jakub Kicinski 1 month, 2 weeks ago
On Mon, 7 Oct 2024 17:21:22 -0700 Jakub Kicinski wrote:
> On Mon,  7 Oct 2024 13:39:23 -0700 Rosen Penev wrote:
> > Fixes: 1ff0fcfcb1a6 ("ibm_newemac: Fix new MAL feature handling")
> > 
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>  
> 
> I'll fix this one when applying but please make sure there is no empty
> lines between tags in the future.

I take that back, 'cause it also doesn't apply
-- 
pw-bot: cr
RE: [PATCH net] net: ibm: emac: mal: add dcr_unmap to _remove
Posted by Keller, Jacob E 1 month, 2 weeks ago

> -----Original Message-----
> From: Rosen Penev <rosenp@gmail.com>
> Sent: Monday, October 7, 2024 1:39 PM
> To: netdev@vger.kernel.org
> Cc: andrew@lunn.ch; davem@davemloft.net; edumazet@google.com;
> kuba@kernel.org; pabeni@redhat.com; linux-kernel@vger.kernel.org; Keller,
> Jacob E <jacob.e.keller@intel.com>; horms@kernel.org; sd@queasysnail.net;
> chunkeey@gmail.com
> 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@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 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@intel.com>