net: phy: micrel: Separate KSZ9000 drivers from KSZ8000 drivers
The KS8721BL and KSZ9021 PHYs are software-incompatible, yet they share the same ID. Drivers for bothe PHYs cannot safely coexist, so the solution was to use #ifdefs to select between the two drivers. As a result KSZ9031, which has a unique ID, is now caught in the crossfire. Unless CONFIG_PHY_MICREL_KSZ9031 is defined, the KSZ9031 will not function properly, as some essential configuration code is ifdef'd-out. To prevent such situations, move the KSZ9000 drivers to a separate file, and place them under a separate Kconfig option. While it is possible to enable both KSZ8000 and KSZ9000 drivers at the same time, the assumption is that it is highly unlikely for a system to contain both a KSZ8000 and a KSZ9000 PHY, and that only one of the drivers will be enabled at any given time. Signed-off-by:Alexandru Gagniuc <alex.g@adaptrum.com> Reviewed-by:
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
Showing
- drivers/net/phy/Kconfig 30 additions, 0 deletionsdrivers/net/phy/Kconfig
- drivers/net/phy/Makefile 2 additions, 1 deletiondrivers/net/phy/Makefile
- drivers/net/phy/micrel_ksz8xxx.c 5 additions, 4 deletionsdrivers/net/phy/micrel_ksz8xxx.c
- drivers/net/phy/micrel_ksz90x1.c 364 additions, 0 deletionsdrivers/net/phy/micrel_ksz90x1.c
- drivers/net/phy/phy.c 5 additions, 2 deletionsdrivers/net/phy/phy.c
- include/phy.h 2 additions, 1 deletioninclude/phy.h
Loading
Please register or sign in to comment