Sfoglia il codice sorgente

smc911x: Fix external PHY detection

If an external PHY is found the driver falls through to the default
case in the switch and overwrites the PHY ID. Add the missing break.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Guennadi Liakhovetski 16 anni fa
parent
commit
f3073ac767
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      drivers/net/smc911x.c

+ 3 - 0
drivers/net/smc911x.c

@@ -722,6 +722,9 @@ static void smc911x_phy_detect(struct net_device *dev)
 						break;
 					}
 				}
+				if (phyaddr < 32)
+					/* Found an external PHY */
+					break;
 			}
 		default:
 			/* Internal media only */