From patchwork Tue Jan 8 16:05:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10752293 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 167846C5 for ; Tue, 8 Jan 2019 16:06:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0359D284CE for ; Tue, 8 Jan 2019 16:06:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA15F28B40; Tue, 8 Jan 2019 16:06:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C47D284CE for ; Tue, 8 Jan 2019 16:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=FhA5y7YawSX9kUvPs2pQdy2WRBq0pHMPl8pwqViDZr0=; b=oyK MkjTBThAnZBuWKA3OuORYnBtChDvlaVI3haw6Zzti0oaQR3auddN/y4PHz3MpswSeAH3nMVpItvRD oL1bhzvrhjjMISM7pElqz4C9Fd0Hw67s8ieYVKPRnTXRNPQXkcs+/NQfLwGOjOT5qtHidmGu8xO7A IwqbRMnms6c8/NpKjMTcKGhGVjTbCO6XmJEVDI5mAfh6s58j1KNwPkZhMXk/BfzUe+0daQMdcWtOI Dx9L1HDHsmf/OvEyGis0Om2TXEiK1Sm2mn+RbXb5EjiFLe1JsxzkmCYvFrb0Tl7rGeOwhkf3jZZjE qMNTpNWBQU2wUOueEvNATF+0OUETCog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggtt6-0007hZ-BS; Tue, 08 Jan 2019 16:05:56 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggtt3-0007ga-N1; Tue, 08 Jan 2019 16:05:55 +0000 Received: from localhost.localdomain ([91.14.64.214]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9sa0-1gaKJm3hyC-00B6US; Tue, 08 Jan 2019 17:05:39 +0100 From: Frank Wunderlich To: Felix Fietkau , John Crispin , Sean Wang , Nelson Chang , "David S. Miller" , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: mediatek: fix warning in phy_start_aneg Date: Tue, 8 Jan 2019 17:05:26 +0100 Message-Id: <20190108160526.18928-1-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:l+mp37KjOVJSmnrQlklK3mKCAchMZ0EQQ1Llijw3B/XrLPiw3H4 pOSn9+778/b+5mU0T8R1EsXyplHgEa4Uf9cFOtH8POmcB9x/j+VQ1arrIlQJIcVlwjX/q32 4U25wQ6UJUV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Caji93G X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_080554_054757_978AB1FC X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang linux 5.0-rc1 shows following warning on bpi-r2/mt7623 bootup: [ 5.170597] WARNING: CPU: 3 PID: 1 at drivers/net/phy/phy.c:548 phy_start_aneg+0x110/0x144 [ 5.178826] called from state READY .... [ 5.264111] [] (phy_start_aneg) from [] (mtk_init+0x414/0x47c) [ 5.271630] r7:df5f5eec r6:c0f08c48 r5:00000000 r4:dea67800 [ 5.277256] [] (mtk_init) from [] (register_netdevice+0x98/0x51c) [ 5.285035] r8:00000000 r7:00000000 r6:c0f97080 r5:c0f08c48 r4:dea67800 [ 5.291693] [] (register_netdevice) from [] (register_netdev+0x2c/0x44) [ 5.299989] r8:00000000 r7:dea2e608 r6:deacea00 r5:dea2e604 r4:dea67800 [ 5.306646] [] (register_netdev) from [] (mtk_probe+0x668/0x7ac) [ 5.314336] r5:dea2e604 r4:dea2e040 [ 5.317890] [] (mtk_probe) from [] (platform_drv_probe+0x58/0xa8) [ 5.325670] r10:c0f86bac r9:00000000 r8:c0fbe578 r7:00000000 r6:c0f86bac r5:00000000 [ 5.333445] r4:deacea10 [ 5.335963] [] (platform_drv_probe) from [] (really_probe+0x2d8/0x424) maybe other boards using this generic driver are affected Signed-off-by: Frank Wunderlich --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 399f565dd85a..e48c06874a85 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -356,6 +356,7 @@ static int mtk_phy_connect(struct net_device *dev) linkmode_copy(dev->phydev->advertising, dev->phydev->supported); linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, dev->phydev->advertising); + phy_start(dev->phydev); phy_start_aneg(dev->phydev); of_node_put(np); @@ -1821,7 +1822,6 @@ static int mtk_open(struct net_device *dev) else refcount_inc(ð->dma_refcnt); - phy_start(dev->phydev); netif_start_queue(dev); return 0;