phy/marvell: disable 4-port phys
authorIan Campbell <ijc@hellion.org.uk>
Wed, 20 Nov 2013 08:30:14 +0000 (08:30 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Wed, 24 Jun 2020 18:56:57 +0000 (19:56 +0100)
Bug-Debian: https://bugs.debian.org/723177
Forwarded: http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/1107774/

The Marvell PHY was originally disabled because it can cause networking
failures on some systems. According to Lennert Buytenhek this is because some
of the variants added did not share the same register layout. Since the known
cases are all 4-ports disable those variants (indicated by a 4 in the
penultimate position of the model name) until they can be audited for
correctness.

[bwh: Also #if-out the init functions for these PHYs to avoid
 compiler warnings]

Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name disable-some-marvell-phys.patch

drivers/net/phy/marvell.c

index a435f7352cfb0b1d9e0169cc4cd37f0322fb41d3..ced214bc589acd8f1f66ffe4b8deeaf2d39e4c8a 100644 (file)
@@ -1006,6 +1006,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
        return genphy_soft_reset(phydev);
 }
 
+#if 0
 static int m88e1149_config_init(struct phy_device *phydev)
 {
        int err;
@@ -1031,7 +1032,9 @@ static int m88e1149_config_init(struct phy_device *phydev)
 
        return genphy_soft_reset(phydev);
 }
+#endif
 
+#if 0
 static int m88e1145_config_init_rgmii(struct phy_device *phydev)
 {
        int err;
@@ -1106,6 +1109,7 @@ static int m88e1145_config_init(struct phy_device *phydev)
 
        return 0;
 }
+#endif
 
 static int m88e1540_get_fld(struct phy_device *phydev, u8 *msecs)
 {
@@ -2272,6 +2276,7 @@ static struct phy_driver marvell_drivers[] = {
                .get_strings = marvell_get_strings,
                .get_stats = marvell_get_stats,
        },
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1145,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -2293,6 +2298,8 @@ static struct phy_driver marvell_drivers[] = {
                .get_tunable = m88e1111_get_tunable,
                .set_tunable = m88e1111_set_tunable,
        },
+#endif
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1149R,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -2311,6 +2318,8 @@ static struct phy_driver marvell_drivers[] = {
                .get_strings = marvell_get_strings,
                .get_stats = marvell_get_stats,
        },
+#endif
+#if 0
        {
                .phy_id = MARVELL_PHY_ID_88E1240,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -2329,6 +2338,7 @@ static struct phy_driver marvell_drivers[] = {
                .get_strings = marvell_get_strings,
                .get_stats = marvell_get_stats,
        },
+#endif
        {
                .phy_id = MARVELL_PHY_ID_88E1116R,
                .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -2469,9 +2479,9 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = {
        { MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK },
-       { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK },
+/*     { MARVELL_PHY_ID_88E1145, MARVELL_PHY_ID_MASK }, */
+/*     { MARVELL_PHY_ID_88E1149R, MARVELL_PHY_ID_MASK }, */
+/*     { MARVELL_PHY_ID_88E1240, MARVELL_PHY_ID_MASK }, */
        { MARVELL_PHY_ID_88E1318S, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1116R, MARVELL_PHY_ID_MASK },
        { MARVELL_PHY_ID_88E1510, MARVELL_PHY_ID_MASK },