diff mbox

smc911x: Fix external PHY detection

Message ID Pine.LNX.4.64.0810112309410.4965@axis700.grange
State Accepted, archived
Headers show

Commit Message

Guennadi Liakhovetski Oct. 11, 2008, 9:10 p.m. UTC
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>
---
against 2.6.27

 drivers/net/smc911x.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

David Miller Oct. 11, 2008, 10:07 p.m. UTC | #1
From: Guennadi Liakhovetski <lg@denx.de>
Date: Sat, 11 Oct 2008 23:10:58 +0200 (CEST)

> 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>

Applied, thanks.

> against 2.6.27

Luckily this still applied cleanly :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Peter Korsgaard Oct. 12, 2008, 7:43 a.m. UTC | #2
>>>>> "Guennadi" == Guennadi Liakhovetski <lg@denx.de> writes:

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

 Guennadi> Signed-off-by: Guennadi Liakhovetski <lg@denx.de>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
diff mbox

Patch

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index c587162..dbc51e9 100644
--- a/drivers/net/smc911x.c
+++ b/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 */