From: Andy Fleming Date: Wed, 9 May 2007 05:54:20 +0000 (-0500) Subject: tsec: Fix PHY code to match first driver X-Git-Tag: v1.3.0-rc1~19^2~20^2~18^2~1^2~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2a3cee43c3b71fa5b8d91db19f05067865290f3e;p=u-boot tsec: Fix PHY code to match first driver 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 --- diff --git a/drivers/tsec.c b/drivers/tsec.c index c19d87fc6a..467df8430b 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -1353,8 +1353,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) {