From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BC9BC7EE23 for ; Wed, 7 Jun 2023 14:12:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235419AbjFGOMc (ORCPT ); Wed, 7 Jun 2023 10:12:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235390AbjFGOM3 (ORCPT ); Wed, 7 Jun 2023 10:12:29 -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 17D25137; Wed, 7 Jun 2023 07:12:28 -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=uVhqIsWCbd8+nVpNyrP6aNc++SDBcJaAni/4NynllGk=; b=1SWC25IVs5qo9VOmQ1jVb+C602 76A2R/8zSYH4u5oyF4RF9lv+X5M2bsBGYDANb6ElGArEkxhKvlxM+tosByB71IqW6se1Ur7uuIcS1 CcWRbft8cI/KfQ4jIoEd4LA+y8X9NadGyPTsfNxsdh7aJz0zR5oS+lBfPth32k9j9yiU+NMcvVLhM QhDd/AZzUAQGKf7QYj1IGga3RS/EbWB5kzYT5CUUI4lt/2qnBa6ExNJ84fIdFgLd3DuQw+/xHtfKR DQdM+/QCAlW2u8/QL+LQc0osP9aKyRS2oifIkV47H+Nmpv5RGCXaFds0Z0thDPWvDcnl5S/4O7zFF IyZVjQeg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48662) 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 1q6ttO-0007b8-SK; Wed, 07 Jun 2023 15:12:06 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1q6ttI-0008IG-UQ; Wed, 07 Jun 2023 15:12:00 +0100 Date: Wed, 7 Jun 2023 15:12:00 +0100 From: "Russell King (Oracle)" To: Arnd Bergmann Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Simon Horman , Maxime Chevallier , Arnd Bergmann , Christian Marangi , Jon Hunter , Bhadram Varka , Samin Guo , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] stmmac: fix pcs_lynx link failure Message-ID: References: <20230607135638.1341101-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607135638.1341101-1-arnd@kernel.org> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 07, 2023 at 03:56:32PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The mdio code in stmmac now directly links into both the lynx_pcs and > the xpcs device drivers, but the lynx_pcs dependency is only enforced > for the altera variant of stmmac, which is the one that actually uses it. > > Building stmmac for a non-altera platform therefore causes a link > failure: > > arm-linux-gnueabi-ld: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.o: in function `stmmac_mdio_unregister': > stmmac_mdio.c:(.text+0x1418): undefined reference to `lynx_pcs_destroy' > > I've tried to come up with a patch that moves this dependency back into > the dwmac-socfpga.c file, but there was no easy and obvious way to > do this. It also seems that this would not be a proper solution, but > instead there should be a real abstraction for pcs drivers that lets > device drivers handle this transparently. There is already a patch set on netdev fixing this properly. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!