From patchwork Sat Oct 11 22:59:44 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 4040 X-Patchwork-Delegate: davem@davemloft.net 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 F145FDDE28 for ; Sun, 12 Oct 2008 09:59:58 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755146AbYJKW7t (ORCPT ); Sat, 11 Oct 2008 18:59:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760882AbYJKW7t (ORCPT ); Sat, 11 Oct 2008 18:59:49 -0400 Received: from mail.gmx.net ([213.165.64.20]:60307 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755752AbYJKW7r (ORCPT ); Sat, 11 Oct 2008 18:59:47 -0400 Received: (qmail invoked by alias); 11 Oct 2008 22:59:46 -0000 Received: from p57BD2073.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.32.115] by mail.gmx.net (mp022) with SMTP; 12 Oct 2008 00:59:46 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX18OakphqfoOuoR3l/n+iIi2LLhbjIGSmp/lt8Nh57 ZGSJPjKWUC9s/R Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1KonR2-00023M-Na; Sun, 12 Oct 2008 00:59:44 +0200 Date: Sun, 12 Oct 2008 00:59:44 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: David Miller cc: jacmet@sunsite.dk, Steve.Glendinning@smsc.com, netdev@vger.kernel.org, Ian.Saturley@smsc.com Subject: [PATCH v2] smc911x: Add support for LAN921{5,7,8} chips from SMSC In-Reply-To: <20081011.150852.73771267.davem@davemloft.net> Message-ID: References: <87k5cfoz7b.fsf@macbook.be.48ers.dk> <20081011.150852.73771267.davem@davemloft.net> MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org LAN92{5,7,8} chips from SMSC are register compatible with LAN911{5,6,7,8} controllers, and only add support for HP Auto-MDIX. LAN9218 doesn't have an external MII interface. Signed-off-by: Guennadi Liakhovetski Acked-by: Peter Korsgaard --- still against 2.6.27, this time without style and DBG() changes. drivers/net/smc911x.c | 6 ++++-- drivers/net/smc911x.h | 14 ++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index dbc51e9..22a0d14 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -685,8 +685,10 @@ static void smc911x_phy_detect(struct net_device *dev) * PHY#1 to PHY#31, and then PHY#0 last. */ switch(lp->version) { - case 0x115: - case 0x117: + case CHIP_9115: + case CHIP_9117: + case CHIP_9215: + case CHIP_9217: cfg = SMC_GET_HW_CFG(lp); if (cfg & HW_CFG_EXT_PHY_DET_) { cfg &= ~HW_CFG_PHY_CLK_SEL_; diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 2abfc28..bf6240f 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -666,10 +666,13 @@ smc_pxa_dma_outsl(struct smc911x_local *lp, u_long physaddr, #define LAN911X_INTERNAL_PHY_ID (0x0007C000) /* Chip ID values */ -#define CHIP_9115 0x115 -#define CHIP_9116 0x116 -#define CHIP_9117 0x117 -#define CHIP_9118 0x118 +#define CHIP_9115 0x0115 +#define CHIP_9116 0x0116 +#define CHIP_9117 0x0117 +#define CHIP_9118 0x0118 +#define CHIP_9215 0x115A +#define CHIP_9217 0x117A +#define CHIP_9218 0x118A struct chip_id { u16 id; @@ -681,6 +684,9 @@ static const struct chip_id chip_ids[] = { { CHIP_9116, "LAN9116" }, { CHIP_9117, "LAN9117" }, { CHIP_9118, "LAN9118" }, + { CHIP_9215, "LAN9215" }, + { CHIP_9217, "LAN9217" }, + { CHIP_9218, "LAN9218" }, { 0, NULL }, };