Thread (21 messages) 21 messages, 4 authors, 2021-09-07

Re: [PATCH v2 10/14] [net-next] make legacy ISA probe optional

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-08-11 14:50:56
Also in: lkml

Hi Arnd,

On Tue, Aug 3, 2021 at 1:41 PM Arnd Bergmann [off-list ref] wrote:
From: Arnd Bergmann <arnd@arndb.de>

There are very few ISA drivers left that rely on the static probing from
drivers/net/Space.o. Make them all select a new CONFIG_NETDEV_LEGACY_INIT
symbol, and drop the entire probe logic when that is disabled.

The 9 drivers that are called from Space.c are the same set that
calls netdev_boot_setup_check().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
quoted hunk ↗ jump to hunk
--- a/drivers/net/ethernet/8390/ne.c
+++ b/drivers/net/ethernet/8390/ne.c
@@ -951,6 +951,7 @@ static int __init ne_init(void)
 }
 module_init(ne_init);

+#ifdef CONFIG_NETDEV_LEGACY_INIT
 struct net_device * __init ne_probe(int unit)
 {
        int this_dev;
@@ -991,6 +992,7 @@ struct net_device * __init ne_probe(int unit)

        return ERR_PTR(-ENODEV);
 }
+#endif
 #endif /* MODULE */
My rbtx4927 build log says:

drivers/net/ethernet/8390/ne.c:909:20: warning: ‘ne_add_devices’
defined but not used [-Wunused-function]

The network still works fine (nfsroot).

CONFIG_MACH_TX49XX=y
CONFIG_NE2000=y
CONFIG_NETDEV_LEGACY_INIT is not set

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help