From patchwork Mon Mar 16 10:55:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shaohui xie X-Patchwork-Id: 450514 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 1A6D61400D5 for ; Mon, 16 Mar 2015 23:03:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011AbbCPMDU (ORCPT ); Mon, 16 Mar 2015 08:03:20 -0400 Received: from mail-by2on0064.outbound.protection.outlook.com ([207.46.100.64]:48544 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751475AbbCPMDH (ORCPT ); Mon, 16 Mar 2015 08:03:07 -0400 X-Greylist: delayed 879 seconds by postgrey-1.27 at vger.kernel.org; Mon, 16 Mar 2015 08:03:07 EDT Received: from BY2PR03CA074.namprd03.prod.outlook.com (10.141.249.47) by CY1PR0301MB0763.namprd03.prod.outlook.com (25.160.160.11) with Microsoft SMTP Server (TLS) id 15.1.112.16; Mon, 16 Mar 2015 11:48:26 +0000 Received: from BY2FFO11FD003.protection.gbl (2a01:111:f400:7c0c::170) by BY2PR03CA074.outlook.office365.com (2a01:111:e400:2c5d::47) with Microsoft SMTP Server (TLS) id 15.1.112.19 via Frontend Transport; Mon, 16 Mar 2015 11:48:25 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD003.mail.protection.outlook.com (10.1.14.125) with Microsoft SMTP Server (TLS) id 15.1.125.13 via Frontend Transport; Mon, 16 Mar 2015 11:48:25 +0000 Received: from Tank.ap.freescale.net (tank.ap.freescale.net [10.193.20.104]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t2GBmKoC002391; Mon, 16 Mar 2015 04:48:22 -0700 From: To: , CC: Shaohui Xie Subject: [PATCH 1/2] [v2] net/fsl: fix a bug in xgmac_mdio Date: Mon, 16 Mar 2015 18:55:50 +0800 Message-ID: <1426503350-23181-1-git-send-email-shh.xie@gmail.com> X-Mailer: git-send-email 1.8.4.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130709801054389461; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=shh.xie@gmail.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(73972006)(83322999)(81442002)(61266001)(50226001)(86362001)(46102003)(73392002)(55446002)(36756003)(19580405001)(82202001)(50986999)(87572001)(6806004)(92566002)(50466002)(106466001)(229853001)(62966003)(48376002)(77156002)(104016003)(86152002)(87936001)(76482003)(15975445007)(77096005)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0763; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0763; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:CY1PR0301MB0763; BCL:0; PCL:0; RULEID:(401004)(400005); SRVR:CY1PR0301MB0763; X-Forefront-PRVS: 05177D47DC X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 11:48:25.1113 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0763 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Shaohui Xie There is a bug in xgmac_wait_until_done() which mdio_stat should be used instead of mdio_data when checking if busy bit is cleared. Signed-off-by: Shaohui Xie --- changes for v2: splitted from http://patchwork.ozlabs.org/patch/450392/ drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 3a83bc2..5f691f2 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -79,7 +79,7 @@ static int xgmac_wait_until_done(struct device *dev, /* Wait till the MDIO write is complete */ timeout = TIMEOUT; - while ((ioread32be(®s->mdio_data) & MDIO_DATA_BSY) && timeout) { + while ((ioread32be(®s->mdio_stat) & MDIO_STAT_BSY) && timeout) { cpu_relax(); timeout--; }