Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp837159rwd; Wed, 7 Jun 2023 07:32:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6kwM4tnbRp7OIzLGC/vpLN25b8GnoJ6DP3FdUIz+meJmOelGx/GdTCXVrT2bSMi2Snwwti X-Received: by 2002:a05:6a20:2591:b0:110:9210:f6af with SMTP id k17-20020a056a20259100b001109210f6afmr1296079pzd.27.1686148343090; Wed, 07 Jun 2023 07:32:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686148343; cv=none; d=google.com; s=arc-20160816; b=wjZlxMpLrg8eRkoIPiGE25z6pprzeVwV+AYovo7wGVVA/rQoVVEbh9mxsL+Edl5OMI nyb2JDasrZZrb3aUgXKWNV/1KKPEXfk8oSbKpXvj0Cr4gFJs0ryONMx7e1zpl/XbVUzm PIgnczJfN2xv0MS1PCwSUsGM8uRucYpikRjLUhNsXRbwwoFxprJFTKFBs/UqpvOVvif+ xCtMQ7CP46nJFnbloM6O1BC2UlTwnfiw91Ar4YBdTjoKk4unIWTqZ2TG0W/b3CGHR1x4 AP6YpX9QgA5RtdD9Kk/I34pweyK/QN6qrROehjy/Gq7s2auIJEXjyGW5MahdFX3rGrRQ WEYg== 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=uVhqIsWCbd8+nVpNyrP6aNc++SDBcJaAni/4NynllGk=; b=BIm1zAaVfgydSsoR+lXQOdIzDGQuCtBfR8l/mvx3f+2/rmYjUsfy74Vkc5RqKzRhCm RgPFZ6PRxlhwh4KhQprcBPWVmx9y/bamKNzGPV8iodW9d2pK17PkPi3DrZBut4OWNEJm JelxigtHRGzQrvE9x6tr+X+Uqb1UDaZ9W2xnYzCqOtXSuAVhMDYw3WF80O8XP+doldie dUz6/ygepynh0MWXy0kQ5+cWJUQl02m1CIqbpFmVlADe59tuDKoOtdNufRZaZhuh9D38 d0SC1ricyo1KZIC6Ett+uEMCMTuvb17nwxLxjsn3np3QTAwC7A5pN0vJB7J4/WEbUbq0 +URg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1SWC25IV; 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 e10-20020a63690a000000b00543c84bf588si4076775pgc.473.2023.06.07.07.32.09; Wed, 07 Jun 2023 07:32:23 -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=1SWC25IV; 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 S240340AbjFGOMa (ORCPT + 99 others); Wed, 7 Jun 2023 10:12:30 -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) 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 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!