Fix compiler warnings in drivers/net/phy/marvell.c after disabling 4-port PHYs

svn path=/dists/sid/linux/; revision=21819
This commit is contained in:
Ben Hutchings 2014-09-12 13:10:45 +00:00
parent b57dc00e8d
commit b2efa14d0b
1 changed files with 35 additions and 8 deletions

View File

@ -1,9 +1,7 @@
From: Ian Campbell <ijc@hellion.org.uk> From: Ian Campbell <ijc@hellion.org.uk>
Subject: phy/marvell: disable 4-port phys Subject: phy/marvell: disable 4-port phys
Date: Wed, 20 Nov 2013 08:30:14 +0000 Date: Wed, 20 Nov 2013 08:30:14 +0000
Forwarded: no Bug-Debian: https://bugs.debian.org/723177
See 723177 for more details. Briefly:
The Marvell PHY was originally disabled because it can cause networking The Marvell PHY was originally disabled because it can cause networking
failures on some systems. According to Lennert Buytenhek this is because some failures on some systems. According to Lennert Buytenhek this is because some
@ -12,9 +10,38 @@ 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 penultimate position of the model name) until they can be audited for
correctness. correctness.
[bwh: Also #if-out the init functions for these PHYs to avoid
compiler warnings]
--- a/drivers/net/phy/marvell.c --- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c
@@ -975,6 +975,7 @@ static struct phy_driver marvell_drivers @@ -591,6 +591,7 @@ static int m88e1118_config_init(struct p
return phy_write(phydev, MII_BMCR, BMCR_RESET);
}
+#if 0
static int m88e1149_config_init(struct phy_device *phydev)
{
int err;
@@ -616,7 +617,9 @@ static int m88e1149_config_init(struct p
return phy_write(phydev, MII_BMCR, BMCR_RESET);
}
+#endif
+#if 0
static int m88e1145_config_init(struct phy_device *phydev)
{
int err;
@@ -682,6 +685,7 @@ static int m88e1145_config_init(struct p
return 0;
}
+#endif
/* marvell_read_status
*
@@ -975,6 +979,7 @@ static struct phy_driver marvell_drivers
.suspend = &genphy_suspend, .suspend = &genphy_suspend,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
@ -22,7 +49,7 @@ correctness.
{ {
.phy_id = MARVELL_PHY_ID_88E1145, .phy_id = MARVELL_PHY_ID_88E1145,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -990,6 +991,8 @@ static struct phy_driver marvell_drivers @@ -990,6 +995,8 @@ static struct phy_driver marvell_drivers
.suspend = &genphy_suspend, .suspend = &genphy_suspend,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
@ -31,7 +58,7 @@ correctness.
{ {
.phy_id = MARVELL_PHY_ID_88E1149R, .phy_id = MARVELL_PHY_ID_88E1149R,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1005,6 +1008,8 @@ static struct phy_driver marvell_drivers @@ -1005,6 +1012,8 @@ static struct phy_driver marvell_drivers
.suspend = &genphy_suspend, .suspend = &genphy_suspend,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
@ -40,7 +67,7 @@ correctness.
{ {
.phy_id = MARVELL_PHY_ID_88E1240, .phy_id = MARVELL_PHY_ID_88E1240,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1020,6 +1025,7 @@ static struct phy_driver marvell_drivers @@ -1020,6 +1029,7 @@ static struct phy_driver marvell_drivers
.suspend = &genphy_suspend, .suspend = &genphy_suspend,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
@ -48,7 +75,7 @@ correctness.
{ {
.phy_id = MARVELL_PHY_ID_88E1116R, .phy_id = MARVELL_PHY_ID_88E1116R,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
@@ -1073,9 +1079,9 @@ static struct mdio_device_id __maybe_unu @@ -1073,9 +1083,9 @@ static struct mdio_device_id __maybe_unu
{ MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1111, MARVELL_PHY_ID_MASK },
{ MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1118, MARVELL_PHY_ID_MASK },
{ MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK }, { MARVELL_PHY_ID_88E1121R, MARVELL_PHY_ID_MASK },