From patchwork Tue Apr 29 17:56:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dinguyen@altera.com X-Patchwork-Id: 343960 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 864821400B2 for ; Wed, 30 Apr 2014 03:59:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933833AbaD2R7O (ORCPT ); Tue, 29 Apr 2014 13:59:14 -0400 Received: from mail-bl2on0144.outbound.protection.outlook.com ([65.55.169.144]:18084 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933160AbaD2R7N (ORCPT ); Tue, 29 Apr 2014 13:59:13 -0400 Received: from BN1AFFO11FD033.protection.gbl (10.58.52.31) by BN1AFFO11HUB032.protection.gbl (10.58.52.142) with Microsoft SMTP Server (TLS) id 15.0.929.8; Tue, 29 Apr 2014 17:58:57 +0000 Received: from SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) by BN1AFFO11FD033.mail.protection.outlook.com (10.58.52.246) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Tue, 29 Apr 2014 17:58:57 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) with Microsoft SMTP Server id 8.3.348.2; Tue, 29 Apr 2014 10:45:30 -0700 Received: from linux-builds1.altera.com (linux-builds1.altera.com [137.57.188.114]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with ESMTP id s3THwrgu010142; Tue, 29 Apr 2014 10:58:55 -0700 (PDT) From: To: CC: , , , , Dinh Nguyen Subject: [PATCH net-next] net: stmmac: set phy to use polling by default Date: Tue, 29 Apr 2014 12:56:21 -0500 Message-ID: <1398794181-17852-1-git-send-email-dinguyen@altera.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.35.236.232; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019001)(6009001)(189002)(199002)(97736001)(92726001)(47776003)(77982001)(99396002)(19580395003)(87936001)(19580405001)(2009001)(48376002)(53416003)(50466002)(83322001)(84676001)(44976005)(50986999)(88136002)(74662001)(74502001)(93916002)(81542001)(62966002)(6806004)(80022001)(92566001)(79102001)(4396001)(33646001)(46102001)(76482001)(50226001)(89996001)(31966008)(87286001)(36756003)(77156001)(80976001)(86362001)(86152002)(20776003)(81342001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1AFFO11HUB032; H:SJ-ITEXEDGE02.altera.priv.altera.com; FPR:FF0CF75D.2CD4A4E9.4D777598.A0C68641.2019C; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-OriginatorOrg: altera.onmicrosoft.com X-Forefront-PRVS: 0196A226D1 Received-SPF: SoftFail (: domain of transitioning altera.com discourages use of 66.35.236.232 as permitted sender) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dinh Nguyen mii_irq[] array is never initialized anywhere in the driver, thus mii_irq[] will always equate to zero. So, for the case where the PHY does not have an irq, we should use PHY_POLL for that situation. Signed-off-by: Dinh Nguyen Tested-by: Vince Bridgers --- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index a468eb1..a5b1e1b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -205,10 +205,13 @@ int stmmac_mdio_register(struct net_device *ndev) if (new_bus == NULL) return -ENOMEM; - if (mdio_bus_data->irqs) + if (mdio_bus_data->irqs) { irqlist = mdio_bus_data->irqs; - else + } else { + for (addr = 0; addr < PHY_MAX_ADDR; addr++) + priv->mii_irq[addr] = PHY_POLL; irqlist = priv->mii_irq; + } #ifdef CONFIG_OF if (priv->device->of_node)