From patchwork Fri Dec 2 07:05:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Fleming X-Patchwork-Id: 128808 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 33CA4100C7F for ; Fri, 2 Dec 2011 18:06:18 +1100 (EST) Received: from DB3EHSOBE005.bigfish.com (db3ehsobe005.messaging.microsoft.com [213.199.154.143]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id DC29B10082D for ; Fri, 2 Dec 2011 18:06:06 +1100 (EST) Received: from mail16-db3-R.bigfish.com (10.3.81.241) by DB3EHSOBE005.bigfish.com (10.3.84.25) with Microsoft SMTP Server id 14.1.225.22; Fri, 2 Dec 2011 07:05:57 +0000 Received: from mail16-db3 (localhost [127.0.0.1]) by mail16-db3-R.bigfish.com (Postfix) with ESMTP id 7B47D20489; Fri, 2 Dec 2011 07:05:57 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail16-db3 (localhost.localdomain [127.0.0.1]) by mail16-db3 (MessageSwitch) id 1322809557397893_7866; Fri, 2 Dec 2011 07:05:57 +0000 (UTC) Received: from DB3EHSMHS006.bigfish.com (unknown [10.3.81.254]) by mail16-db3.bigfish.com (Postfix) with ESMTP id 5C21D480043; Fri, 2 Dec 2011 07:05:57 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS006.bigfish.com (10.3.87.106) with Microsoft SMTP Server (TLS) id 14.1.225.22; Fri, 2 Dec 2011 07:05:57 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.339.2; Fri, 2 Dec 2011 01:05:51 -0600 Received: from localhost (right.am.freescale.net [10.82.193.13]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id pB275oGx020582; Fri, 2 Dec 2011 01:05:50 -0600 (CST) From: Andy Fleming To: David Miller , Kumar Gala Subject: [PATCH] Revert "net: fsl_pq_mdio: fix non tbi phy access" Date: Fri, 2 Dec 2011 01:05:48 -0600 Message-ID: <1322809549-32622-1-git-send-email-afleming@freescale.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org This reverts commit c3e072f8a6c5625028531c40ec65f7e301531be2. The TBI PHY Address must always be set to something sensible. If not, the value currently in the register may interfere with MDIO transactions to that address. The architected solution is to have a TBI node in the device tree, which corresponds to the desired address (and which should be chosen so that it does not conflict with other PHYs on the bus). If that node is not there, it is incorrect to just continue. We must return an error, so that developers have a chance to realize they've mis-configured their device trees. A separate patch has been submitted to add such a node to the device trees for boards which were missing that node. Signed-off-by: Andy Fleming --- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index f109602..6ff124c 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c @@ -356,16 +356,16 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev) if (prop) tbiaddr = *prop; + } - if (tbiaddr == -1) { - err = -EBUSY; + if (tbiaddr == -1) { + err = -EBUSY; - goto err_free_irqs; - } else { - out_be32(tbipa, tbiaddr); - } + goto err_free_irqs; } + out_be32(tbipa, tbiaddr); + err = of_mdiobus_register(new_bus, np); if (err) { printk (KERN_ERR "%s: Cannot register as MDIO bus\n",