Skip to contentSkip to conversation

net: ibm: emac: mal: add dcr_unmap to _remove

PATCH Superseded Rosen Penev 3 participants 4 messages Oct 7, 2024 – Oct 8, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/ethernet/ibm/emac/mal.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/ibm/emac/mal.c +2 -0
index 1e1860ddc363..b1a32070f03a 100644
@@ -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 +
Signature · 1 line
2.46.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 36 lines

-----Original Message-----
From: Rosen Penev <[email protected]>
Sent: Monday, October 7, 2024 1:39 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Keller, Jacob E <[email protected]>; [email protected]; [email protected]; [email protected]
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")
---
 drivers/net/ethernet/ibm/emac/mal.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/ibm/emac/mal.c +2 -1
index 1e1860ddc363..b1a32070f03a 100644
@@ -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 +
--
Quoted 1 line

2.46.2

maintainer
#3 lore raw
Quoted 7 lines · On Mon, 7 Oct 2024 17:21:22 -0700 Jakub Kicinski wrote:
Quoted 3 lines · On Mon, 7 Oct 2024 13:39:23 -0700 Rosen Penev wrote:
Fixes 1ff0fcfcb1a6 ("ibm_newemac: Fix new MAL feature handling")

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

Signature · 1 line
pw-bot: cr