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: 10752295 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 C997A746 for ; Tue, 8 Jan 2019 16:06:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E9228ABF for ; Tue, 8 Jan 2019 16:06:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAE7128C0A; Tue, 8 Jan 2019 16:06:08 +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=unavailable 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 641F728ABF for ; Tue, 8 Jan 2019 16:06:08 +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=zsgGmCr1LEGz1iOp5dAFaQtmcumjdLv+bCxn2ASdNEk=; b=e0y JhWYS9TeXg1EP95Nazo8KdMLuCkIikLLf8QsNMhu7yT9FkB5A8H4u++8FNx3PE++M/WTY7RcC4r0H EkLt2N65LudS2QZ4xlZ51/iodQ2BWvVvVNQk2IjknF17Jn5au99lkV1P9mObJjHKmh7yU2O1zKaU3 1io0Q4r5DLBpAoUzZp8NXAeoE77kctxdSYB7/hMRdIbYSbhlMxpr0HJ+nQfSDONdXNrN47IOb8rCt YFzL7Nq3D0dVZ+7KOKqcqMbseocOd9E6bwwUI0BEGyag8dXu2W2sZGxqFOCSq37OVrZI70DRFgs1s ptuiE02S/n6njxMaDyxXQ1qti5OSvjg==; 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 1ggttF-0007rl-K6; Tue, 08 Jan 2019 16:06:05 +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-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=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;