From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guennadi Liakhovetski Subject: [PATCH] smc911x: Fix external PHY detection Date: Sat, 11 Oct 2008 23:10:58 +0200 (CEST) Message-ID: References: <87vdx5gjzo.fsf@macbook.be.48ers.dk> <871vynr3yb.fsf@macbook.be.48ers.dk> <87k5cfoz7b.fsf@macbook.be.48ers.dk> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Steve.Glendinning@smsc.com, netdev@vger.kernel.org, Ian.Saturley@smsc.com To: Peter Korsgaard Return-path: Received: from mail.gmx.net ([213.165.64.20]:55685 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1760717AbYJKVK6 (ORCPT ); Sat, 11 Oct 2008 17:10:58 -0400 In-Reply-To: <87k5cfoz7b.fsf@macbook.be.48ers.dk> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- against 2.6.27 drivers/net/smc911x.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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 */ -- 1.5.4