diff options
-rw-r--r-- | Documentation/networking/stmmac.txt | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 1 | ||||
-rw-r--r-- | include/linux/stmmac.h | 1 |
4 files changed, 3 insertions, 12 deletions
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index c676b9cedbd0..ef9ee71b4d7f 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -173,7 +173,6 @@ Where: | |||
173 | For MDIO bus The we have: | 173 | For MDIO bus The we have: |
174 | 174 | ||
175 | struct stmmac_mdio_bus_data { | 175 | struct stmmac_mdio_bus_data { |
176 | int bus_id; | ||
177 | int (*phy_reset)(void *priv); | 176 | int (*phy_reset)(void *priv); |
178 | unsigned int phy_mask; | 177 | unsigned int phy_mask; |
179 | int *irqs; | 178 | int *irqs; |
@@ -181,7 +180,6 @@ For MDIO bus The we have: | |||
181 | }; | 180 | }; |
182 | 181 | ||
183 | Where: | 182 | Where: |
184 | o bus_id: bus identifier; | ||
185 | o phy_reset: hook to reset the phy device attached to the bus. | 183 | o phy_reset: hook to reset the phy device attached to the bus. |
186 | o phy_mask: phy mask passed when register the MDIO bus within the driver. | 184 | o phy_mask: phy mask passed when register the MDIO bus within the driver. |
187 | o irqs: list of IRQs, one per PHY. | 185 | o irqs: list of IRQs, one per PHY. |
@@ -230,9 +228,6 @@ there are two MAC cores: one MAC is for MDIO Bus/PHY emulation | |||
230 | with fixed_link support. | 228 | with fixed_link support. |
231 | 229 | ||
232 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { | 230 | static struct stmmac_mdio_bus_data stmmac1_mdio_bus = { |
233 | .bus_id = 1, | ||
234 | | | ||
235 | |-> phy device on the bus_id 1 | ||
236 | .phy_reset = phy_reset; | 231 | .phy_reset = phy_reset; |
237 | | | 232 | | |
238 | |-> function to provide the phy_reset on this board | 233 | |-> function to provide the phy_reset on this board |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index e1f3d04a8c90..0376a5e6b2bf 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | |||
@@ -177,7 +177,7 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
177 | new_bus->write = &stmmac_mdio_write; | 177 | new_bus->write = &stmmac_mdio_write; |
178 | new_bus->reset = &stmmac_mdio_reset; | 178 | new_bus->reset = &stmmac_mdio_reset; |
179 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x", | 179 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x", |
180 | new_bus->name, mdio_bus_data->bus_id); | 180 | new_bus->name, priv->plat->bus_id); |
181 | new_bus->priv = ndev; | 181 | new_bus->priv = ndev; |
182 | new_bus->irq = irqlist; | 182 | new_bus->irq = irqlist; |
183 | new_bus->phy_mask = mdio_bus_data->phy_mask; | 183 | new_bus->phy_mask = mdio_bus_data->phy_mask; |
@@ -213,12 +213,10 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
213 | * and no PHY number was provided to the MAC, | 213 | * and no PHY number was provided to the MAC, |
214 | * use the one probed here. | 214 | * use the one probed here. |
215 | */ | 215 | */ |
216 | if ((priv->plat->bus_id == mdio_bus_data->bus_id) && | 216 | if (priv->plat->phy_addr == -1) |
217 | (priv->plat->phy_addr == -1)) | ||
218 | priv->plat->phy_addr = addr; | 217 | priv->plat->phy_addr = addr; |
219 | 218 | ||
220 | act = (priv->plat->bus_id == mdio_bus_data->bus_id) && | 219 | act = (priv->plat->phy_addr == addr); |
221 | (priv->plat->phy_addr == addr); | ||
222 | switch (phydev->irq) { | 220 | switch (phydev->irq) { |
223 | case PHY_POLL: | 221 | case PHY_POLL: |
224 | irq_str = "POLL"; | 222 | irq_str = "POLL"; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c index 13afb8edfadc..1f069b0f6af5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | |||
@@ -40,7 +40,6 @@ static void stmmac_default_data(void) | |||
40 | plat_dat.has_gmac = 1; | 40 | plat_dat.has_gmac = 1; |
41 | plat_dat.force_sf_dma_mode = 1; | 41 | plat_dat.force_sf_dma_mode = 1; |
42 | 42 | ||
43 | mdio_data.bus_id = 1; | ||
44 | mdio_data.phy_reset = NULL; | 43 | mdio_data.phy_reset = NULL; |
45 | mdio_data.phy_mask = 0; | 44 | mdio_data.phy_mask = 0; |
46 | plat_dat.mdio_bus_data = &mdio_data; | 45 | plat_dat.mdio_bus_data = &mdio_data; |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index b69bdb1e08b6..a1547ea3920d 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -76,7 +76,6 @@ | |||
76 | /* Platfrom data for platform device structure's platform_data field */ | 76 | /* Platfrom data for platform device structure's platform_data field */ |
77 | 77 | ||
78 | struct stmmac_mdio_bus_data { | 78 | struct stmmac_mdio_bus_data { |
79 | int bus_id; | ||
80 | int (*phy_reset)(void *priv); | 79 | int (*phy_reset)(void *priv); |
81 | unsigned int phy_mask; | 80 | unsigned int phy_mask; |
82 | int *irqs; | 81 | int *irqs; |