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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9677EC34021 for ; Mon, 17 Feb 2020 17:23:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 697BD20801 for ; Mon, 17 Feb 2020 17:23:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ooJdo15m"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="bEe7Mh3Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 697BD20801 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject: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=S23KZSa5CTKAi0chOPlf6Armxo0BsyNM3INWAl7AXLM=; b=ooJdo15mH2SsWG jzJUF7j8bKO2bOE/ebjur3qHC+7LS5S3eQKFSWP8rTtpQifXgkfPfigyGj4y+Cv/oekmHd6eONViz MA71My0j1zWuHklXfOXAglYcOpR1tmirqQmm17EBE95ZsU38mgTjnJRUrlBlqyp1kppFRetXKqkwZ cFrVcYmS8jVDQNQFGseP+S96NE0W3Zg/3723selARjbMnYkVnYjGJ78DaBiPIA+aeObbfTxi936fJ Gmyt/vOqztRpqYH4z93Vps/C58Oy3dK/JYND0Sj70nrtfk98wB7smtjxAifykIn/RBnutW6jnE7TJ He277V02AvpkJX43Sn7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3k7I-0003Fp-VH; Mon, 17 Feb 2020 17:23:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3k7F-0003Eh-8o; Mon, 17 Feb 2020 17:23:30 +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=oY8Hprjp+0+cXfhTnYBhP1nb+wmn9WucklmpZMOU5v0=; b=bEe7Mh3ZHtZITIcMegKi4Tbq4 cF+tqyiLbpTEFFpy450jEylMS4b4m+hbKMBKY71wdC+5KZTtI5/MOb2u6WU3FcjhGi1j1pEnut6Vo sRL0jkk5D0BMR1L7eJoa66h+dB2q54hf0vhFhNLm9u5Yavss7dHxtDRlX5RCCQlT4WiCdHpAKI6UX lxAU1dkOo6Gu6OTxbpoPD8/uecUCaX2OcbKPqabfYCPphI1IAlyGsHVSClmPRW1CXlRhn88AuagDO sxOvIzOwdZyQAxJhOQyZLSJJN3JHwYJklWvrKhLi3986Exl+lCs4IkBsb/dT4De5XxR53+j+dU4EZ UjtJnpZhQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53260) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j3k6g-000266-K1; Mon, 17 Feb 2020 17:22:54 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1j3k6V-0006UE-2c; Mon, 17 Feb 2020 17:22:43 +0000 Date: Mon, 17 Feb 2020 17:22:43 +0000 From: Russell King - ARM Linux admin To: Andrew Lunn , Florian Fainelli , Heiner Kallweit Subject: [CFT 0/8] rework phylink interface for split MAC/PCS support Message-ID: <20200217172242.GZ25745@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_092329_313739_F182E91F X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Thomas Petazzoni , linux-stm32@st-md-mailman.stormreply.com, Felix Fietkau , Ioana Radulescu , Jonathan Corbet , Michal Simek , Jose Abreu , Jakub Kicinski , Mark Lee , Sean Wang , Alexandre Torgue , Hauke Mehrtens , Radhey Shyam Pandey , linux-mediatek@lists.infradead.org, John Crispin , Matthias Brugger , Giuseppe Cavallaro , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, Vivien Didelot , Maxime Coquelin , Vladimir Oltean , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, The following series changes the phylink interface to allow us to better support split MAC / MAC PCS setups. The fundamental change required for this turns out to be quite simple. Today, mac_config() is used for everything to do with setting the parameters for the MAC, and mac_link_up() is used to inform the MAC driver that the link is now up (and so to allow packet flow.) mac_config() also has had a few implementation issues, with folk who believe that members such as "speed" and "duplex" are always valid, where "link" gets used inappropriately, etc. With the proposed patches, all this changes subtly - but in a backwards compatible way at this stage. We pass the the full resolved link state (speed, duplex, pause) to mac_link_up(), and it is now guaranteed that these parameters to this function will always be valid (no more SPEED_UNKNOWN or DUPLEX_UNKNOWN here - unless phylink is fed with such things.) Drivers should convert over to using the state in mac_link_up() rather than configuring the speed, duplex and pause in the mac_config() method. The patch series includes a number of MAC drivers which I've thought have been easy targets - I've left the remainder as I think they need maintainer input. However, *all* drivers will need conversion for future phylink development. Documentation/networking/sfp-phylink.rst | 17 +++- drivers/net/dsa/b53/b53_common.c | 4 +- drivers/net/dsa/b53/b53_priv.h | 4 +- drivers/net/dsa/bcm_sf2.c | 4 +- drivers/net/dsa/lantiq_gswip.c | 4 +- drivers/net/dsa/mt7530.c | 4 +- drivers/net/dsa/mv88e6xxx/chip.c | 79 +++++++++++++---- drivers/net/dsa/sja1105/sja1105_main.c | 4 +- drivers/net/ethernet/cadence/macb.h | 1 - drivers/net/ethernet/cadence/macb_main.c | 53 ++++++----- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 61 ++++++++----- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h | 1 + drivers/net/ethernet/marvell/mvneta.c | 63 ++++++++----- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 102 +++++++++++++--------- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 37 ++++---- drivers/net/phy/phylink.c | 9 +- include/linux/phylink.h | 57 ++++++++---- include/net/dsa.h | 4 +- net/dsa/port.c | 7 +- 21 files changed, 350 insertions(+), 176 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel