Re: nt: usb: USB_RTL8153_ECM should not default to y
From: Maciej Żenczykowski <hidden>
Date: 2021-09-17 17:59:30
Subsystem:
networking drivers, the rest, usb networking drivers · Maintainers:
Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds
I've been browsing some usb ethernet dongle related stuff in the kernel (trying to figure out which options to enable in Android 13 5.~15 kernels), and I've come across the following patch (see topic, full patch quoted below). Doesn't it entirely defeat the purpose of the patch it claims to fix (and the patch that fixed)? Certainly the reasoning provided (in general device drivers should not be enabled by default) doesn't jive with me. The device driver is CDC_ETHER and AFAICT this is just a compatibility option for it. Shouldn't it be reverted (ie. the 'default y' line be re-added) ? AFAICT the logic should be: if we have CDC ETHER (aka. ECM), but we don't have R8152 then we need to have R8153_ECM. Alternatively, maybe there shouldn't be a config option for this at all? Instead r8153_ecm should simply be part of cdc_ether.ko iff r8152=n I'm not knowledgeable enough about Kconfig syntax to know how to phrase the logic... Maybe there shouldn't be a Kconfig option at all, and just some Makefile if'ery. Something like: obj-$(CONFIG_USB_RTL8152) += r8152.o obj-$(CONFIG_USB_NET_CDCETHER) += cdc_ether.o obj- ifndef CONFIG_USB_RTL8152 obj-$(CONFIG_USB_NET_CDCETHER) += r8153_ecm.o endif Though it certainly would be nice to use 8153 devices with the CDCETHER driver even with the r8152 driver enabled... Cheers, - Maciej
--- --- ---
commit 7da17624e7948d5d9660b910f8079d26d26ce453
Author: Geert Uytterhoeven [off-list ref]
Date: Wed Jan 13 15:43:09 2021 +0100
nt: usb: USB_RTL8153_ECM should not default to y
In general, device drivers should not be enabled by default.
Fixes: 657bc1d10bfc23ac ("r8153_ecm: avoid to be prior to r8152 driver")
Signed-off-by: Geert Uytterhoeven [off-list ref]
Reviewed-by: Greg Kroah-Hartman [off-list ref]
Link: https://lore.kernel.org/r/20210113144309.1384615-1-geert+renesas@glider.be (local)
Signed-off-by: Jakub Kicinski [off-list ref]
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 1e3719028780..fbbe78643631 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig@@ -631,7 +631,6 @@ config USB_NET_AQC111 config USB_RTL8153_ECM tristate "RTL8153 ECM support" depends on USB_NET_CDCETHER && (USB_RTL8152 || USB_RTL8152=n) - default y help This option supports ECM mode for RTL8153 ethernet adapter, when CONFIG_USB_RTL8152 is not set, or the RTL8153 device is not
Maciej Żenczykowski, Kernel Networking Developer @ Google