[PATCH] realtek: Fix kernel dependencies on CONFIG_MDIO_SMBUS

Birger Koblitz mail at birger-koblitz.de
Sun Mar 13 22:56:07 PDT 2022


Hi,

CONFIG_SFP should only depend on CONFIG_MDIO_SMBUS on the RTL93xx platforms.
This is because only on those platforms there is hardware support for an SMBus
controller which is used for the MDIO of the SFP ports.
If we had known about the worning, then we would have tried to fix it by
making CONFIG_SFP only on the 93xx platforms dependent on CONFIG_MDIO_SMBUS.
How to do this is however not clear to me.

Cheers,
 Birger

On 13.03.22 20:47, Hauke Mehrtens wrote:
> CONFIG_SFP depends on CONFIG_MDIO_SMBUS now and this depends on
> CONFIG_I2C_SMBUS. Activate the missing kernel compile options.
> 
> This fixes the following warning:
> WARNING: unmet direct dependencies detected for MDIO_SMBUS
>   Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] && I2C_SMBUS [=n]
>   Selected by [y]:
>   - SFP [=y] && NETDEVICES [=y] && PHYLIB [=y] && I2C [=y] && PHYLINK [=y] && (HWMON [=y] || HWMON [=y]=n)
> 
> Fixes: 45053b507c66 ("realtek: Add support for SFP EEPROM-access over SMBus")
> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
>  target/linux/realtek/rtl838x/config-5.10 | 2 ++
>  target/linux/realtek/rtl839x/config-5.10 | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/target/linux/realtek/rtl838x/config-5.10 b/target/linux/realtek/rtl838x/config-5.10
> index 8e27af95ba46..16964d94c967 100644
> --- a/target/linux/realtek/rtl838x/config-5.10
> +++ b/target/linux/realtek/rtl838x/config-5.10
> @@ -90,6 +90,7 @@ CONFIG_I2C_GPIO=y
>  CONFIG_I2C_MUX=y
>  # CONFIG_I2C_RTL9300 is not set
>  # CONFIG_I2C_MUX_RTL9300 is not set
> +CONFIG_I2C_SMBUS=y
>  CONFIG_INITRAMFS_SOURCE=""
>  CONFIG_IRQCHIP=y
>  CONFIG_IRQ_DOMAIN=y
> @@ -107,6 +108,7 @@ CONFIG_MDIO_BUS=y
>  CONFIG_MDIO_DEVICE=y
>  CONFIG_MDIO_DEVRES=y
>  CONFIG_MDIO_I2C=y
> +CONFIG_MDIO_SMBUS=y
>  CONFIG_MEMFD_CREATE=y
>  CONFIG_MFD_SYSCON=y
>  CONFIG_MIGRATION=y
> diff --git a/target/linux/realtek/rtl839x/config-5.10 b/target/linux/realtek/rtl839x/config-5.10
> index 5704b4265a3c..b3192d1866da 100644
> --- a/target/linux/realtek/rtl839x/config-5.10
> +++ b/target/linux/realtek/rtl839x/config-5.10
> @@ -86,6 +86,7 @@ CONFIG_I2C_BOARDINFO=y
>  CONFIG_I2C_GPIO=y
>  # CONFIG_I2C_RTL9300 is not set
>  # CONFIG_I2C_MUX_RTL9300 is not set
> +CONFIG_I2C_SMBUS=y
>  CONFIG_INITRAMFS_SOURCE=""
>  CONFIG_IRQCHIP=y
>  CONFIG_IRQ_DOMAIN=y
> @@ -104,6 +105,7 @@ CONFIG_MDIO_BUS=y
>  CONFIG_MDIO_DEVICE=y
>  CONFIG_MDIO_DEVRES=y
>  CONFIG_MDIO_I2C=y
> +CONFIG_MDIO_SMBUS=y
>  CONFIG_MEMFD_CREATE=y
>  CONFIG_MFD_SYSCON=y
>  CONFIG_MIGRATION=y



More information about the openwrt-devel mailing list