]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: phy: Remove residual magic from PHY drivers
authorAndrew Lunn <andrew@lunn.ch>
Tue, 16 May 2017 16:29:11 +0000 (18:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 May 2017 19:58:18 +0000 (15:58 -0400)
commit fa8cddaf903c ("net phylib: Remove unnecessary condition check in phy")
removed the only place where the PHY flag PHY_HAS_MAGICANEG was
checked. But it left the flag being set in the drivers. Remove the flag.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/broadcom.c
drivers/net/phy/micrel.c
drivers/net/phy/microchip.c
drivers/net/phy/smsc.c
include/linux/phy.h

index a32dc5d11e8956ebd66646420ed6915985b45491..1e9ad30a35c8e50b9eead2d5f749c8381fd50624 100644 (file)
@@ -540,7 +540,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5411",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -551,7 +551,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5421",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -562,7 +562,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM54210E",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -573,7 +573,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5461",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -584,7 +584,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM54612E",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -595,7 +595,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM54616S",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -606,7 +606,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5464",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -617,7 +617,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5481",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = bcm5481_config_aneg,
        .read_status    = genphy_read_status,
@@ -628,7 +628,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM54810",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = bcm5481_config_aneg,
        .read_status    = genphy_read_status,
@@ -639,7 +639,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5482",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm5482_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = bcm5482_read_status,
@@ -650,7 +650,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM50610",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -661,7 +661,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM50610M",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -672,7 +672,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM57780",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = bcm54xx_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -683,7 +683,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCMAC131",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = brcm_fet_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -694,7 +694,7 @@ static struct phy_driver broadcom_drivers[] = {
        .phy_id_mask    = 0xfffffff0,
        .name           = "Broadcom BCM5241",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = brcm_fet_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
index 6a5fd18f062c4ea400bc8036d787a94fe5108a34..4cfd54182da215ede71a598f0d3a0dba2b0fed86 100644 (file)
@@ -779,7 +779,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KS8737",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ks8737_type,
        .config_init    = kszphy_config_init,
        .config_aneg    = genphy_config_aneg,
@@ -793,7 +793,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = 0x00ffffff,
        .name           = "Micrel KSZ8021 or KSZ8031",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8021_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -811,7 +811,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = 0x00ffffff,
        .name           = "Micrel KSZ8031",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8021_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -829,7 +829,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ8041",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8041_type,
        .probe          = kszphy_probe,
        .config_init    = ksz8041_config_init,
@@ -847,7 +847,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ8041RNLI",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8041_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -865,7 +865,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ8051",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8051_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -883,7 +883,7 @@ static struct phy_driver ksphy_driver[] = {
        .name           = "Micrel KSZ8001 or KS8721",
        .phy_id_mask    = 0x00fffffc,
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8041_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -901,7 +901,7 @@ static struct phy_driver ksphy_driver[] = {
        .name           = "Micrel KSZ8081 or KSZ8091",
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz8081_type,
        .probe          = kszphy_probe,
        .config_init    = kszphy_config_init,
@@ -919,7 +919,7 @@ static struct phy_driver ksphy_driver[] = {
        .name           = "Micrel KSZ8061",
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = kszphy_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -932,7 +932,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = 0x000ffffe,
        .name           = "Micrel KSZ9021 Gigabit PHY",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz9021_type,
        .probe          = kszphy_probe,
        .config_init    = ksz9021_config_init,
@@ -952,7 +952,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ9031 Gigabit PHY",
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .driver_data    = &ksz9021_type,
        .probe          = kszphy_probe,
        .config_init    = ksz9031_config_init,
@@ -969,7 +969,6 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id         = PHY_ID_KSZ8873MLL,
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ8873MLL Switch",
-       .flags          = PHY_HAS_MAGICANEG,
        .config_init    = kszphy_config_init,
        .config_aneg    = ksz8873mll_config_aneg,
        .read_status    = ksz8873mll_read_status,
@@ -980,7 +979,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ886X Switch",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = kszphy_config_init,
        .config_aneg    = genphy_config_aneg,
        .read_status    = genphy_read_status,
@@ -991,7 +990,7 @@ static struct phy_driver ksphy_driver[] = {
        .phy_id_mask    = MICREL_PHY_ID_MASK,
        .name           = "Micrel KSZ8795",
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+       .flags          = PHY_HAS_INTERRUPT,
        .config_init    = kszphy_config_init,
        .config_aneg    = ksz8873mll_config_aneg,
        .read_status    = ksz8873mll_read_status,
index 2b2f543cf9f030dbea5b2c478f6b8930f5fa520e..37ee856c7680a6c9c6b09a52dad088092c630994 100644 (file)
@@ -146,7 +146,7 @@ static struct phy_driver microchip_phy_driver[] = {
        .name           = "Microchip LAN88xx",
 
        .features       = PHY_GBIT_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = lan88xx_probe,
        .remove         = lan88xx_remove,
index cef6967b039617fdd909e783ca479a8241eebd88..67c9f2b26c8eb777c5b492a48764698c63093b00 100644 (file)
@@ -170,7 +170,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN83C185",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
@@ -192,7 +192,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN8187",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
@@ -214,7 +214,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN8700",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
@@ -236,7 +236,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN911x Internal PHY",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
@@ -257,7 +257,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN8710/LAN8720",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
@@ -279,7 +279,7 @@ static struct phy_driver smsc_phy_driver[] = {
        .name           = "SMSC LAN8740",
 
        .features       = PHY_BASIC_FEATURES,
-       .flags          = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG,
+       .flags          = PHY_HAS_INTERRUPT,
 
        .probe          = smsc_phy_probe,
 
index e76e4adbc7c728efdbadae302af8259d5d55dc05..54ef45823fc17801f166c5092d9010e241948ed2 100644 (file)
@@ -58,8 +58,7 @@
 #define PHY_IGNORE_INTERRUPT   -2
 
 #define PHY_HAS_INTERRUPT      0x00000001
-#define PHY_HAS_MAGICANEG      0x00000002
-#define PHY_IS_INTERNAL                0x00000004
+#define PHY_IS_INTERNAL                0x00000002
 #define MDIO_DEVICE_IS_PHY     0x80000000
 
 /* Interface Mode definitions */