]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tsec: Fix PHY code to match first driver
authorAndy Fleming <afleming@freescale.com>
Wed, 9 May 2007 05:54:20 +0000 (00:54 -0500)
committerAndrew Fleming-AFLEMING <afleming@freescale.com>
Wed, 11 Jul 2007 23:19:06 +0000 (18:19 -0500)
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>
drivers/tsec.c

index c19d87fc6a4bc96064cf448e7d64577ffdac6865..467df8430ba2f2f3c835473fc6a231310bd8ac3e 100644 (file)
@@ -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) {