diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-11-07 08:52:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-08 07:18:58 +0100 |
commit | 3b73e842c7265a645f373a2de956ad36292f819d (patch) | |
tree | f237ef9c509b4b311ac60d7f96b6e945138d7f59 | |
parent | net: phy: make phy_trigger_machine static (diff) | |
download | linux-3b73e842c7265a645f373a2de956ad36292f819d.tar.xz linux-3b73e842c7265a645f373a2de956ad36292f819d.zip |
net: phy: realtek: load driver for all PHYs with a Realtek OUI
Instead of listing every single PHYID, load the driver for every PHYID
with a Realtek OUI, independent of model number and revision.
This patch also improves two further aspects:
- constify realtek_tbl[]
- the mask should have been 0xffffffff instead of 0x001fffff so far,
by masking out some bits a PHY from another vendor could have been
matched
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/realtek.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 271e8adc39f1..7b1c89b3833c 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -305,15 +305,8 @@ static struct phy_driver realtek_drvs[] = { module_phy_driver(realtek_drvs); -static struct mdio_device_id __maybe_unused realtek_tbl[] = { - { 0x001cc816, 0x001fffff }, - { 0x001cc910, 0x001fffff }, - { 0x001cc912, 0x001fffff }, - { 0x001cc913, 0x001fffff }, - { 0x001cc914, 0x001fffff }, - { 0x001cc915, 0x001fffff }, - { 0x001cc916, 0x001fffff }, - { 0x001cc961, 0x001fffff }, +static const struct mdio_device_id __maybe_unused realtek_tbl[] = { + { 0x001cc800, GENMASK(31, 10) }, { } }; |