From patchwork Wed May 29 13:28:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13678840 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52BFFC27C43 for ; Wed, 29 May 2024 13:29:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date: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=98HQQmR/NSiFTKvBt+JWc0LbJutJFfrhEXaT0OeI+0g=; b=LAMOp154lRrZYU jlk8eb8Ky3iaUDbg3FYPPjqqFAhuriUM6EC43nSyzf0MpH8sM8yjaXvNrQX0c6PraN1IKR7Xt6sOm SzdEG4eFK+XL334QBip7+4JQgYAexT5lsLyvbjaGkX2zYkZ955k8sTCHGGkw4k1UVSuFxR1uJ0QII OK00i+hoGKbWX3OC73YKiXR768dHw0UELusZSlBnEMVWi/dAKY/LtlQYiqVU5rQQMhevC4HLqe9g3 CNmAKw/E8NLcs4p129NJns4ZwLRQm3lN9WuhdfR5YVwV3MH2sdxqUm0qq1IpySojql5tNoaiSJhao aBqYhgG2wypuXVNWCVlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCJMV-00000004G8Y-03dx; Wed, 29 May 2024 13:29:03 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCJMR-00000004G5d-3hun for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2024 13:29:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BDYEhepQA/d2FZ56BctnoAn7J3hrIwALy9fmhbjaYl0=; b=Irq/mhY9oMmIKSYt8KYRcpNoWI Tu6uA1dOIDvk44vXrQbgz8vwQCIxdLVpc9xD9jeJVpUufdEaZhPHp0sIX0wNRrV3HSjWxd/bcQY95 2EY0cywXA03kIKmfTlEg0HCDSFH4Xl7C2HjPUCKMveyqJ6cC2XWj+OcHRpj7jLL2lm+n/c3D4UM92 spEQw2vcGA/OxQwux39bDI+S3Dmcan0L5hf1Btbam7jZYQx+I4UdZv+8Gw7Dq8D7NWblVSf0il9+d ApbaVENFAL4DHzrWAt3g31qs8kvcLnsEiF9lI5SPqp8cjR/K88jjbkIvF86JuIoVMCjlAPk1CeNBr 1X+f/oTQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:50668) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sCJMC-00069W-2P; Wed, 29 May 2024 14:28:44 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sCJMA-0004Eb-Nb; Wed, 29 May 2024 14:28:42 +0100 Date: Wed, 29 May 2024 14:28:42 +0100 From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jose Abreu , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Madalin Bucur , Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Sean Anderson , Andrew Halaney , Serge Semin Subject: [PATCH net-next 0/6] net: phylink: rearrange ovr_an_inband support Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_062859_980600_2C490593 X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series addresses the use of the ovr_an_inband flag, which is used by two drivers to indicate to phylink that they wish to use inband mode without firmware specifying inband mode. The issue with ovr_an_inband is that it overrides not only PHY mode, but also fixed-link mode. Both of the drivers that set this flag contain code to detect when fixed-link mode will be used, and then either avoid setting it or explicitly clear the flag. This is wasteful when phylink already knows this. Therefore, the approach taken in this patch set is to replace the ovr_an_inband flag with a default_an_inband flag which means that phylink defaults to MLO_AN_INBAND instead of MLO_AN_PHY, and will allow that default to be overriden if firmware specifies a fixed-link. This allows users of ovr_an_inband to be simplified. What's more is this requires minimal changes in phylink to allow this new mode of operation. This series changes phylink, and also updates the two drivers (fman_memac and stmmac), and then removes the unnecessary complexity from the drivers. This series may depend on the stmmac cleanup series I've posted earlier - this is something I have not checked, but I currently have these patches on top of that series. drivers/net/ethernet/freescale/fman/fman_memac.c | 16 ++++++---------- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 15 ++------------- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- drivers/net/phy/phylink.c | 11 ++++++++--- include/linux/phylink.h | 5 +++-- include/linux/stmmac.h | 2 +- 6 files changed, 22 insertions(+), 31 deletions(-) Reviewed-by: Andrew Halaney