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 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 3FA08C433EF for ; Tue, 7 Dec 2021 15:56:54 +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=Pz1h2MX16TjttcQI5LXXQb8OuJ6qYteQMLOtnAEzzyA=; b=SjvswAWen+KEpD ayTwqoZyd/9zD6L/5k0sCPdPy9SXt27ymAVclr0B5u4oFFGQDhxi9QrUSKWJFaPkylFZg7gjOTcpX X1FWQwg9+4yUdUKhimTeX+V/NfEP7/4izlYEYWrkAmzM3apo2A3YNxzs7TAoGs3wbfHBmGK2Ah8pQ GqVT430b0lH5SLqGSQkyNJT4YgUxPg78yRiCgfJMHMVqPot7LPvfPOQmDpC+/l63S4iPTTZDbzn2w 3K1ntRvzOUnb9Y9ykVKoqlVstp5OX1i2phUltqfGNuz+1QwE0dYGIOB3ufyb712w7Whe1B8uCwbD3 go5BjySx4kv1YjWG+tZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mucoG-009KcU-B1; Tue, 07 Dec 2021 15:55:16 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mucnF-009JaG-24; Tue, 07 Dec 2021 15:54:14 +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=mHHA4yNbkBopyxIjfJPY6MSbIpnvXuPcH/0ewslIK50=; b=Cg4u354wikJNNrDdU/27QOIjI4 RkJugbt/S55vLhL2Y01crzU7UoJL9zp/grZEDjlU0yZMSTNIYreQ7kfTxqcWeqmOfyMwBb43cqxt7 bgOkmEhpI5epoI18AyvfgDt+l/tEpDt4d1NfmdmFREn4D91maqdLLC2OhCW+MLTxOhulaE2iCR9Hu 8Y1fLEwQmteH5seCtdnWKMdgHTdWhfU0+n5jsT1H9h7p+R4PPtDZZobXWTWVW9L1NOpPqwI2yp2KT Q0in9lqXUnAenM50ingsuV1fBaW++Q4zbH+CT8Zh5ulmntd50C+He8ddJvHqvXee7ijbkRNJWLu8f SSnT1xUA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56166) 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 1mucl3-0006Od-CQ; Tue, 07 Dec 2021 15:51:58 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1muckz-0005SZ-Ck; Tue, 07 Dec 2021 15:51:53 +0000 Date: Tue, 7 Dec 2021 15:51:53 +0000 From: "Russell King (Oracle)" To: Chris Snook , Felix Fietkau , Florian Fainelli , John Crispin , Mark Lee , Matthias Brugger , Sean Wang , Vivien Didelot , Vladimir Oltean Cc: Andrew Lunn , "David S. Miller" , Heiner Kallweit , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH net-next 0/5] net: phylink: introduce legacy mode flag 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-20211207_075413_133086_C667CC62 X-CRM114-Status: GOOD ( 16.36 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, In March 2020, phylink gained support to split the PCS support out of the MAC callbacks. By doing so, a slight behavioural difference was introduced when a PCS is present, specifically: 1) the call to mac_config() when the link comes up or advertisement changes were eliminated 2) mac_an_restart() will never be called 3) mac_pcs_get_state() will never be called The intention was to eventually remove this support once all phylink users were converted. Unfortunately, this still hasn't happened - and in some cases, it looks like it may never happen. Through discussion with Sean Anderson, we now need to allow the PCS to be optional for modern drivers, so we need a different way to identify these legacy drivers - in that we wish to allow the "modern" behaviour where mac_config() is not called on link-up events, even if there is no PCS attached. In order to do that, this series of patches introduce a "legacy_pre_march2020" which is used to permit the old behaviour - in other words, we get the old behaviour only when there is no PCS and this flag is true. Otherwise, we get the new behaviour. I decided to use the date of the change in the flag as just using "legacy" or "legacy_driver" is too non-descript. An alternative could be to use the git sha1 hash of the set of changes. I believe I have added the legacy flag to all the drivers which use legacy mode - that being the mtk_eth_soc ethernet driver, and many DSA drivers - the ones which need the old behaviour are identified by having non-NULL phylink_mac_link_state or phylink_mac_an_restart methods in their dsa_switch_ops structure. ag71xx and xilinx do not need the legacy flag. ag71xx is explained in its own commit, and xilinx only updates the inband advertisement in the mac_config() call, which is sufficient qualification to avoid it being marked legacy. drivers/net/ethernet/atheros/ag71xx.c | 13 ------------- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++ drivers/net/phy/phylink.c | 12 ++++++------ include/linux/phylink.h | 20 ++++++++++++++++++++ net/dsa/port.c | 7 +++++++ 5 files changed, 37 insertions(+), 19 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel