Re: [PATCH v4 2/5] net: lan743x: read SFP straps from PCI11x1x device
From: Andrew Lunn
Date: Wed May 27 2026 - 09:30:15 EST
> > > Introduce CONFIG_LAN743X_SFP to guard SFP-specific code
> >
> > Why? Does this add a lot of code? Most MAC drivers don't have such a Kconfig
> > configuration, so i think this needs some justification.
> [Thangaraj Samynathan] CONFIG_LAN743X_SFP was introduced based on
> Jakub's v3 review feedback. There are devices on this LAN743x family
> of devices (LAN7430, LAN7431, PCI11x1x) that do not support SFP at
> all. So while the amount of code in the common LAN743x driver itself
> may not be that much, the dependencies could force an intended
> minimalistic build of the kernel that wanted to use the lan7430 device
> (which is rgmii only capable device) to have to include tons of kernel
> code (sfp, i2c, gpio) it does not need otherwise.
In practice distributions turn on nearly everything. So the code is
likely to be built. Rather than a Kconfig symbol, can you move the
code into a module, which only gets loaded for pci11x1x?
Andrew