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 94CA8C2BA4C for ; Wed, 26 Jan 2022 10:26:14 +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=ZHI8ry650dmii6aSG5MpKnaaR53ST+UQl/FsSfIUG/8=; b=Uu50hThvN6Rx7O lmT9051AJiGdtgE5cAOww9Vjgb94HrgMBmzqldZjPiYWiaRsesZpgWlOAJFe52obwAEmj1ULSD6TD WrGLagnwT946F/iTyVjfzeG6K0J73Cl59wKdOelhj4ivdQ46rvEqoT+6MVvw7UvBgpZJBU/xVuUjr VWgS4BPACDk2lYCggsD/OHzM7QyGTxVgbA4HXrq/a6vwPw2mTZuhkFaTljvr7ABnagkA/ZLaNqxFR 9GVrVQ7lf4wCXKUWe4RgjpCdw2017gSPy/yXr97q3zrOSqARsswdilxC3EG6njX9TA6L0zYlL1c0E 9g8IP3H6ouqi/g7i98nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCfU0-00BDCl-GF; Wed, 26 Jan 2022 10:24:56 +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 1nCfTw-00BDBt-Qp for linux-arm-kernel@lists.infradead.org; Wed, 26 Jan 2022 10:24:54 +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=/6zKtcwzooenCgSVBoRCKQBbFYCmsYCampZ6jZN82wU=; b=ougJfRnyvIN9UezTZv1B11ujjp aj0uHN9Ai35DPBzxMJSSzZuch7CgnnohJ/gpmdXytN45lw/HwoC7PfzQPjbzLcxfldtswonx+3m9S s69YlJpDzPI4n0O4es7B3nP1EV4wmMhFEe1htuno4MffUUuRmon38G65gACjzn0nIIfyO6TGEWeIv OSQXRFweqzoVBwaRYMkS31T7sIwqrRKL2ZX6YAbIqNNVRX3ieVODlMqp7uLoESRjW2+wYEpLCO/AE FVree4ZXFyPqMhW1aGdHx3n4/t1Px61JBYJW+/XCmXflElOhqamMXK+UbJixW16oBFLZ6z1u0z2JB bpIzE/+A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56874) 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 1nCfTo-00037x-91; Wed, 26 Jan 2022 10:24:44 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nCfTk-0004Ny-Nf; Wed, 26 Jan 2022 10:24:40 +0000 Date: Wed, 26 Jan 2022 10:24:40 +0000 From: "Russell King (Oracle)" To: Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Maxime Coquelin Cc: Andrew Lunn , "David S. Miller" , Heiner Kallweit , Jakub Kicinski , Jose Abreu , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org Subject: [PATCH net-next v2 0/7] net: stmmac/xpcs: modernise PCS 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-20220126_022452_898847_91A0C2DB X-CRM114-Status: GOOD ( 16.11 ) 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, This series updates xpcs and stmmac for the recent changes to phylink to better support split PCS and to get rid of private MAC validation functions. This series is slightly more involved than other conversions as stmmac has already had optional proper split PCS support. The first six patches of this series were originally posted on 16th December for CFT, and Wong Vee Khee reported his Intel Elkhart Lake setup was fine the first six these. However, no tested-by was given. The patches: 1) Provide a function to query the xpcs for the interface modes that are supported. 2) Populates the MAC capabilities and switches stmmac_validate() to use phylink_get_linkmodes(). We do not use phylink_generic_validate() yet as (a) we do not always have the supported interfaces populated, and (b) the existing code does not restrict based on interface. There should be no functional effect from this patch. 3) Populates phylink's supported interfaces from the xpcs when the xpcs is configured by firmware and also the firmware configured interface mode. Note: this will restrict stmmac to only supporting these interfaces modes - stmmac maintainers need to verify that this behaviour is acceptable. 4) stmmac_validate() tail-calls xpcs_validate(), but we don't need it to now that PCS have their own validation method. Convert stmmac and xpcs to use this method instead. 5) xpcs sets the poll field of phylink_pcs to true, meaning xpcs requires its status to be polled. There is no need to also set the phylink_config.pcs_poll. Remove this. 6) Switch to phylink_generic_validate(). This is probably the most contravertial change in this patch set as this will cause the MAC to restrict link modes based on the interface mode. From an inspection of the xpcs driver, this should be safe, as XPCS only further restricts the link modes to a subset of these (whether that is correct or not is not an issue I am addressing here.) For implementations that do not use xpcs, this is a more open question and needs feedback from stmmac maintainers. 7) Convert to use mac_select_pcs() rather than phylink_set_pcs() to set the PCS - the intention is to eventually remove phylink_set_pcs() once there are no more users of this. v2: fix signoff and temporary warning in patch 4 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 147 +++++++--------------- drivers/net/pcs/pcs-xpcs.c | 41 +++--- include/linux/pcs/pcs-xpcs.h | 3 +- 3 files changed, 73 insertions(+), 118 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