This is a note to let you know that I've just added the patch titled Revert "net: ibm/emac: allocate dummy net_device dynamically" to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-net-ibm-emac-allocate-dummy-net_device-dynami.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 65d15142e3974a28a8fab7d9ad1a7ae4d5a2b26d Author: Sasha Levin <sashal@xxxxxxxxxx> Date: Sun Oct 13 12:39:55 2024 -0400 Revert "net: ibm/emac: allocate dummy net_device dynamically" This reverts commit b40eeedbbc0833716b5ccae64cf914f2604a3e5e, which was upstream commit 2eb5e25d8495 ("net: ibm/emac: allocate dummy net_device dynamically"). alloc_netdev_dummy(( does not exist in 6.1, so all this backport did was break the build. Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c index 1ebe44804f9d0..f30a2b8a7c173 100644 --- a/drivers/net/ethernet/ibm/emac/mal.c +++ b/drivers/net/ethernet/ibm/emac/mal.c @@ -603,13 +603,9 @@ static int mal_probe(struct platform_device *ofdev) INIT_LIST_HEAD(&mal->list); spin_lock_init(&mal->lock); - mal->dummy_dev = alloc_netdev_dummy(0); - if (!mal->dummy_dev) { - err = -ENOMEM; - goto fail_unmap; - } + init_dummy_netdev(&mal->dummy_dev); - netif_napi_add_weight(mal->dummy_dev, &mal->napi, mal_poll, + netif_napi_add_weight(&mal->dummy_dev, &mal->napi, mal_poll, CONFIG_IBM_EMAC_POLL_WEIGHT); /* Load power-on reset defaults */ @@ -639,7 +635,7 @@ static int mal_probe(struct platform_device *ofdev) GFP_KERNEL); if (mal->bd_virt == NULL) { err = -ENOMEM; - goto fail_dummy; + goto fail_unmap; } for (i = 0; i < mal->num_tx_chans; ++i) @@ -705,8 +701,6 @@ static int mal_probe(struct platform_device *ofdev) free_irq(mal->serr_irq, mal); fail2: dma_free_coherent(&ofdev->dev, bd_size, mal->bd_virt, mal->bd_dma); - fail_dummy: - free_netdev(mal->dummy_dev); fail_unmap: dcr_unmap(mal->dcr_host, 0x100); fail: @@ -738,8 +732,6 @@ static int mal_remove(struct platform_device *ofdev) mal_reset(mal); - free_netdev(mal->dummy_dev); - dcr_unmap(mal->dcr_host, 0x100); dma_free_coherent(&ofdev->dev, diff --git a/drivers/net/ethernet/ibm/emac/mal.h b/drivers/net/ethernet/ibm/emac/mal.h index e0ddc41186a28..d212373a72e7c 100644 --- a/drivers/net/ethernet/ibm/emac/mal.h +++ b/drivers/net/ethernet/ibm/emac/mal.h @@ -205,7 +205,7 @@ struct mal_instance { int index; spinlock_t lock; - struct net_device *dummy_dev; + struct net_device dummy_dev; unsigned int features; };