
Jarrold Wen noticed that the generic PHY code always matches under the current implementation. Change it so the first match wins, and *only* unknown PHYs trigger the generic driver
Signed-off-by: Andy Fleming afleming@freescale.com --- A third apology for bad tabs. I'll keep better tabs on in the future, I swear.
drivers/tsec.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/tsec.c b/drivers/tsec.c index 693328d..31a0aba 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -1327,8 +1327,10 @@ struct phy_info *get_phy_info(struct eth_device *dev) /* loop through all the known PHY types, and find one that */ /* matches the ID we read from the PHY. */ for (i = 0; phy_info[i]; i++) { - if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) + if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) { theInfo = phy_info[i]; + break; + } }
if (theInfo == NULL) {