All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: nt: usb: USB_RTL8153_ECM should not default to y
@ 2021-09-17 17:59 Maciej Żenczykowski
  2021-09-17 18:49 ` Jakub Kicinski
  0 siblings, 1 reply; 10+ messages in thread
From: Maciej Żenczykowski @ 2021-09-17 17:59 UTC (permalink / raw)
  To: Geert Uytterhoeven, Greg Kroah-Hartman, Jakub Kicinski,
	Linux NetDev, Hayes Wang, Marek Szyprowski
  Cc: Maciej Zenczykowski

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 <geert+renesas@glider.be>
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 <geert+renesas@glider.be>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20210113144309.1384615-1-geert+renesas@glider.be
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-09-21 21:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 17:59 nt: usb: USB_RTL8153_ECM should not default to y Maciej Żenczykowski
2021-09-17 18:49 ` Jakub Kicinski
2021-09-17 19:05   ` Maciej Żenczykowski
2021-09-17 19:37     ` Jakub Kicinski
2021-09-18 11:16       ` Geert Uytterhoeven
2021-09-18 10:53   ` Geert Uytterhoeven
2021-09-20 19:15     ` Jakub Kicinski
2021-09-20 20:19       ` Maciej Żenczykowski
2021-09-21  7:30         ` Geert Uytterhoeven
2021-09-21 21:28           ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.