[PATCH] Fix ucc_geth MII master selection
From: Joakim Tjernlund <hidden>
Date: 2008-02-14 17:11:22
Remove bogus UCC regs range test and correct off by one error in call to ucc_set_qe_mux_mii_mng() Signed-off-by: Joakim Tjernlund <redacted> --- I am not 100% sure this is the correct fix, please ACK or NACK drivers/net/ucc_geth_mii.c | 26 +++++++++++--------------- 1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index 6c257b8..472d5a1 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/drivers/net/ucc_geth_mii.c@@ -200,21 +200,17 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma if (err) goto bus_register_fail; - /* if our mdio regs fall within this UCC regs range */ - if ((res.start >= tempres.start) && - (res.end <= tempres.end)) { - /* set this UCC to be the MII master */ - const u32 *id = of_get_property(tempnp, "device-id", NULL); - if (id == NULL) - goto bus_register_fail; - - ucc_set_qe_mux_mii_mng(*id - 1); - - /* assign the TBI an address which won't - * conflict with the PHYs */ - out_be32(®s->utbipar, UTBIPAR_INIT_TBIPA); - break; - } + /* set this UCC to be the MII master */ + const u32 *id = of_get_property(tempnp, "device-id", NULL); + if (id == NULL) + goto bus_register_fail; + + ucc_set_qe_mux_mii_mng(*id); + + /* assign the TBI an address which won't + * conflict with the PHYs */ + out_be32(®s->utbipar, UTBIPAR_INIT_TBIPA); + break; } err = mdiobus_register(new_bus);
--
1.5.3.8