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@kernel.org>
This commit is contained in:
Sasha Levin
2024-10-13 12:39:55 -04:00
committed by Greg Kroah-Hartman
parent 9fae1a346f
commit 80faf6afeb
2 changed files with 4 additions and 12 deletions

View File

@@ -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,

View File

@@ -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;
};