Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6920781rwd; Tue, 6 Jun 2023 04:04:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HlVGEBnRq0ijLB29hYKxzrsKuLKPacAeLsyZkJDW9EBvgvKV+jQERQyUzIvmZnphb7PY1 X-Received: by 2002:ac8:5dc9:0:b0:3f5:3991:97b8 with SMTP id e9-20020ac85dc9000000b003f5399197b8mr1647970qtx.66.1686049447299; Tue, 06 Jun 2023 04:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686049447; cv=none; d=google.com; s=arc-20160816; b=Z38Zwb0qic64L5IZ4Y2wNBRX4RUveZNlmiQiS6tQbYn+NTk6aiQ2lWX3MLlaJd3A+g PJdUHoZ4vAAm9U5w+TfWV2NodNc3pSc2gGN0RAX/qsOEgD0sW2zeU5MWA35ziUAfvBpP qwqBiWHbU+hx5JUem+GoqI283/JJCC+mufAThbmIkSUBQThXrShs1YsFXvsWTiSYj+q9 CxYtc14UD8H10vpfHuWZdhatI5wvJA+aAN/7tOeu5QdAEnykC/H+mRDVVrUIlC9xLuiB H+0GWrtQwOaCm6e2wyKEoPnIZyAQ2v2/anfCwjgnZnThNk4crUb2nUoME+bGpvItxQe9 2hwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=klQyBW+EVKyIsuT8ceA9jlZizSQdtGWXnKsVgnySEDY=; b=XidbqZ5xNOaxLKH0bI3Y/OoLCNsUZ8tY88pesbZSwPg1GubSdM3b+DcsmoUQ1z9Rhm 8qhJk4CuLC++fjdjFeMtKCBeFHWWtAP5Zf+SaC5rFJ1WGAeoLaxjHv1AFKZaf0/BKloA APXDEywKMQdam790qFQmbib86pim9h5JYFIuysYVQr6cfYBqcXsfzFaWeKTL2pxUuoNQ R60p2X07ozAWMRh5cP20vjHHxCxpN6AYfZymrZUP9q0Ebe9CnoNXdKSPIyY4Rybr136R ZylmKBREMxa/5rL85iN+qu4xGT12LSqgZ563+pOZnaRXO5buUocR42f5B9WmWT7FHOmt 7fBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1wRvIU8G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020ac85c93000000b003f0acbd88f4si5815409qta.470.2023.06.06.04.03.48; Tue, 06 Jun 2023 04:04:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1wRvIU8G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236817AbjFFKmj (ORCPT + 99 others); Tue, 6 Jun 2023 06:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236809AbjFFKmE (ORCPT ); Tue, 6 Jun 2023 06:42:04 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 386A210E4; Tue, 6 Jun 2023 03:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=klQyBW+EVKyIsuT8ceA9jlZizSQdtGWXnKsVgnySEDY=; b=1wRvIU8G2nMubJPt48iYnhphbU oLCH8nh/13RTGHFFwP7K6gwZaqtDKdgmLWdPv/74wb3h9ol5FOyxlQg1ccufhr2/W3sqfuUy3AMGy v7nJ9MzUaHsJKBjp2cbtx9InKPFdsK2xykpcJd3/RZIdzPg2e5INlWndR0cZsCHM2IBXCShrXQT/U NYc7dsi/EMLIa/VOIFm3K0RR0BIjtGMYjjzEhDU4Kkg0BeGsde6DLUk3hAZ7gnMWjySiqajqdwVbL 9Sl+Mz8IhzhJN12Ts6fS+M1zbLXcWzA3rKqoPStfJ4ipkipgkzZte4KxhR4QTz+788oaG/2s+J6vc oj6TGoTg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:57734) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q6U6u-0005VC-6o; Tue, 06 Jun 2023 11:40:20 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1q6U6r-00074o-Pr; Tue, 06 Jun 2023 11:40:17 +0100 Date: Tue, 6 Jun 2023 11:40:17 +0100 From: "Russell King (Oracle)" To: Maxime Chevallier Cc: Geert Uytterhoeven , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro , Simon Horman Subject: Re: [PATCH net-next 1/2] net: stmmac: Add PCS_LYNX as a dependency for the whole driver Message-ID: References: <20230606064914.134945-1-maxime.chevallier@bootlin.com> <20230606064914.134945-2-maxime.chevallier@bootlin.com> <889297a0-88c3-90df-7752-efa00184859@linux-m68k.org> <20230606121311.3cc5aa78@pc-7.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 06, 2023 at 11:34:44AM +0100, Russell King (Oracle) wrote: > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > index fa07b0d50b46..1801f8cc8413 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > > @@ -940,9 +940,6 @@ static struct phylink_pcs *stmmac_mac_select_pcs(struct phylink_config *config, > > if (priv->hw->xpcs) > > return &priv->hw->xpcs->pcs; > > > > - if (priv->hw->lynx_pcs) > > - return priv->hw->lynx_pcs; > > - > > This hunk is completely wrong... but I guess you spotted that anyway. Replacement... diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c index e399fccbafe5..239c7e9ed41d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -494,6 +494,17 @@ static int socfpga_dwmac_probe(struct platform_device *pdev) return ret; } +static void socfpga_dwmac_remove(struct platform_device *pdev) +{ + struct net_device *ndev = platform_get_drvdata(pdev); + struct stmmac_priv *priv = netdev_priv(ndev); + struct phylink_pcs *pcs = priv->hw->lynx_pcs; + + stmmac_pltfr_remove(pdev); + + lynx_pcs_destroy(pcs); +} + #ifdef CONFIG_PM_SLEEP static int socfpga_dwmac_resume(struct device *dev) { @@ -565,7 +576,7 @@ MODULE_DEVICE_TABLE(of, socfpga_dwmac_match); static struct platform_driver socfpga_dwmac_driver = { .probe = socfpga_dwmac_probe, - .remove_new = stmmac_pltfr_remove, + .remove_new = socfpga_dwmac_remove, .driver = { .name = "socfpga-dwmac", .pm = &socfpga_dwmac_pm_ops, diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index c784a6731f08..3db1cb0fd160 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -665,9 +665,6 @@ int stmmac_mdio_unregister(struct net_device *ndev) if (priv->hw->xpcs) xpcs_destroy(priv->hw->xpcs); - if (priv->hw->lynx_pcs) - lynx_pcs_destroy(priv->hw->lynx_pcs); - mdiobus_unregister(priv->mii); priv->mii->priv = NULL; mdiobus_free(priv->mii); -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!