From patchwork Sat Oct 11 21:10:58 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 4036 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6B54DDDE07 for ; Sun, 12 Oct 2008 08:11:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760747AbYJKVK7 (ORCPT ); Sat, 11 Oct 2008 17:10:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760725AbYJKVK7 (ORCPT ); Sat, 11 Oct 2008 17:10:59 -0400 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 Received: (qmail invoked by alias); 11 Oct 2008 21:10:54 -0000 Received: from p57BD2073.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.32.115] by mail.gmx.net (mp014) with SMTP; 11 Oct 2008 23:10:54 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1/MubZiVQDMMQiX7C2c9mP60TIMPlGzliAJjJ5uWT Xk8LOR9Y8L69tH Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1Koljn-0001wL-1I; Sat, 11 Oct 2008 23:10:59 +0200 Date: Sat, 11 Oct 2008 23:10:58 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Peter Korsgaard cc: Steve.Glendinning@smsc.com, netdev@vger.kernel.org, Ian.Saturley@smsc.com Subject: [PATCH] smc911x: Fix external PHY detection In-Reply-To: <87k5cfoz7b.fsf@macbook.be.48ers.dk> 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 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Acked-by: Peter Korsgaard --- 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 */