From patchwork Tue Oct 27 21:55:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Collins X-Patchwork-Id: 164272 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id D55ACB6FE0 for ; Tue, 12 Jun 2012 09:02:39 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SeDd0-0003z2-Hw; Mon, 11 Jun 2012 23:02:30 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SeDcs-0003hC-9r for kernel-team@lists.ubuntu.com; Mon, 11 Jun 2012 23:02:22 +0000 Received: by mail-pz0-f49.google.com with SMTP id m1so6348994dad.8 for ; Mon, 11 Jun 2012 16:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:in-reply-to:references:from:date:subject:to; bh=MUBmuQgqmx091IQ02BeGHn8V5ZhCZuesJ3YfSXFHW40=; b=yTw/78DVQEovWLD0tRB8VzVPyj/Vo5PvZNI98rgx4+n6G937GbKHNl/VvfTdlyzhBl Y0k+hRJcXYwEUoT/tIZCA4fVM2VMGgoXSAzx7KSR5Lj032N86w6cjaKQTwhHDtz8IIZ8 5HcN30yUNwr+4YZmDGzNYOnRUjSv4d0LtCPShn9B2Tn1ropsddMUAO92hUqKKEhvcI7B BgIQC1R9avM+dI3SduCViZzMpOh/Z6IxxbCbvQ4aU7dEqR4588PUKWjdRZknhofxAIXp 1kw/YYszznUlsT5WraUeXyeJbe5vTJ5vdoW6AAKTecmsw64AGNsdfMnZXO2+mOfOyB2T pByA== Received: by 10.68.211.41 with SMTP id mz9mr31022098pbc.12.1339455741767; Mon, 11 Jun 2012 16:02:21 -0700 (PDT) Received: from localhost (ip68-13-200-36.hr.hr.cox.net. [68.13.200.36]) by mx.google.com with ESMTPS id og4sm7153699pbb.48.2012.06.11.16.02.18 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Jun 2012 16:02:20 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 11 Jun 2012 19:02:16 -0400 Message-Id: <21eb4fde97ebff3488b19c2fdfd6ffe4469d6b56.1339455422.git.bcollins@ubuntu.com> In-Reply-To: References: From: Emil Medve Date: Tue, 27 Oct 2009 16:55:41 -0500 Subject: [PATCH 16/27] UBUNTU: SAUCE: phylib: Minimum hack to get the generic 10G PHY driver to work with 10G "fixed-link"s To: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This patch is being maintained and will eventually be merged upstream by Freescale directly. The powerpc-e500mc flavour uses this. Signed-off-by: Emil Medve Signed-off-by: Ben Collins --- drivers/net/phy/fixed.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 633680d..65e106b 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -5,6 +5,7 @@ * Anton Vorontsov * * Copyright (c) 2006-2007 MontaVista Software, Inc. + * Copyright 2009 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +57,9 @@ static int fixed_phy_update_regs(struct fixed_phy *fp) bmcr |= BMCR_FULLDPLX; switch (fp->status.speed) { + case 10000: + fp->regs[MDIO_STAT2] = MDIO_STAT2_DEVPRST_VAL; + break; case 1000: bmsr |= BMSR_ESTATEN; bmcr |= BMCR_SPEED1000; @@ -75,6 +80,9 @@ static int fixed_phy_update_regs(struct fixed_phy *fp) } } else { switch (fp->status.speed) { + case 10000: + fp->regs[MDIO_STAT2] = MDIO_STAT2_DEVPRST_VAL; + break; case 1000: bmsr |= BMSR_ESTATEN; bmcr |= BMCR_SPEED1000;