Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764079AbcLSRTZ (ORCPT ); Mon, 19 Dec 2016 12:19:25 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:49137 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763694AbcLSRTU (ORCPT ); Mon, 19 Dec 2016 12:19:20 -0500 Subject: Re: [PATCH] stmmac: fix memory barriers To: Joao Pinto , David Miller , References: <20161218203812.GA1012@amd> <20161219.110655.448567935176535028.davem@davemloft.net> <79efbe1a-bdc3-2aca-88a2-42a1b29f292d@synopsys.com> CC: , , , , From: Niklas Cassel Message-ID: <886b24a5-6d54-4bd5-2143-d8f2cbe6c746@axis.com> Date: Mon, 19 Dec 2016 18:19:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <79efbe1a-bdc3-2aca-88a2-42a1b29f292d@synopsys.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: XBOX04.axis.com (10.0.5.18) To XBOX02.axis.com (10.0.5.16) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5605 Lines: 129 On 12/19/2016 06:10 PM, Joao Pinto wrote: > Hi, > > I am trying to built net-next git tree and it is failing: > > CC drivers/pnp/card.o > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function > ?stmmac_hw_fix_mac_speed?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:224:34: error: ?struct > stmmac_priv? has no member named ?phydev? > struct phy_device *phydev = priv->phydev; Are you really building net-next? http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/tree/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c#n224 The phy_device initializer does not appear to match your output. > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_eee_init?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:298:24: error: ?struct > stmmac_priv? has no member named ?phydev? > if (phy_init_eee(priv->phydev, 1)) { > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:330:44: error: ?struct > stmmac_priv? has no member named ?phydev? > priv->hw->mac->set_eee_pls(priv->hw, priv->phydev->link); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_init_ptp?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:672:2: error: void value not > ignored as it ought to be > return stmmac_ptp_register(priv); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_adjust_link?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:694:34: error: ?struct > stmmac_priv? has no member named ?phydev? > struct phy_device *phydev = priv->phydev; > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_init_phy?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:884:6: error: ?struct > stmmac_priv? has no member named ?phydev? > priv->phydev = phydev; > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_open?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1810:10: error: ?struct > stmmac_priv? has no member named ?phydev? > if (priv->phydev) > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1811:17: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_start(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1858:10: error: ?struct > stmmac_priv? has no member named ?phydev? > if (priv->phydev) > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1859:22: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_disconnect(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_release?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1878:10: error: ?struct > stmmac_priv? has no member named ?phydev? > if (priv->phydev) { > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1879:16: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_stop(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1880:22: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_disconnect(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1881:7: error: ?struct > stmmac_priv? has no member named ?phydev? > priv->phydev = NULL; > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_ioctl?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2883:12: error: ?struct > stmmac_priv? has no member named ?phydev? > if (!priv->phydev) > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2885:27: error: ?struct > stmmac_priv? has no member named ?phydev? > ret = phy_mii_ioctl(priv->phydev, rq, cmd); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_suspend?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3438:10: error: ?struct > stmmac_priv? has no member named ?phydev? > if (priv->phydev) > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3439:16: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_stop(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_resume?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3533:10: error: ?struct > stmmac_priv? has no member named ?phydev? > if (priv->phydev) > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3534:17: error: ?struct > stmmac_priv? has no member named ?phydev? > phy_start(priv->phydev); > ^ > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ?stmmac_init_ptp?: > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:673:1: warning: control > reaches end of non-void function [-Wreturn-type] > } > ^ > CC drivers/pnp/driver.o > make[5]: *** [drivers/net/ethernet/stmicro/stmmac/stmmac_main.o] Error 1 > make[4]: *** [drivers/net/ethernet/stmicro/stmmac] Error 2 > make[3]: *** [drivers/net/ethernet/stmicro] Error 2 > make[3]: *** Waiting for unfinished jobs.... > CC drivers/pnp/resource.o > > Thanks, > Joao > > ?s 4:06 PM de 12/19/2016, David Miller escreveu: >> From: Pavel Machek >> Date: Sun, 18 Dec 2016 21:38:12 +0100 >> >>> Fix up memory barriers in stmmac driver. They are meant to protect >>> against DMA engine, so smp_ variants are certainly wrong, and dma_ >>> variants are preferable. >>> >>> Signed-off-by: Pavel Machek >> Applied. >>