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 CB85EFA3740 for ; Thu, 27 Oct 2022 13:36:08 +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:In-Reply-To:MIME-Version:References: 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: List-Owner; bh=oOI7SKUNH3NMhTsQ7rwfyjQzjw2CvFjqFhoM0AEvYGk=; b=3wV8AcU7AcIedI o1RUT1tgyVKeV0VKhLbgKNvJO18w2pd153hJl1NgSXIUdoj4Cu0xTYIwVaYSSxymkHfCx3CtNoBAj z7n/FOS0BqSECWK2MohyKwtm+Or17Y33X4deN7nwcQEehpPdzeJbyeR10ARLVF62BW6saWa6XY0PJ ktNHnzuIOf5fWeZ/fQRseWHPOBk3GRSQ0MIntZzulAeGzwZhsm/SbQYWxXjSrr3o7g44Ci+z7wvSp SPwx4oCT3YhyZaSj9Gm+pDIAq9/qSMHYlwcdSGS39dq8c0b2AXA6kZe9BeLZc60lKuGmrGtdRlfrA 5iGAp+tm/g/MWC5bw7pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oo322-00DZ2N-UU; Thu, 27 Oct 2022 13:34:51 +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 1oo2rg-00DTN2-Je; Thu, 27 Oct 2022 13:24:10 +0000 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=Ic5qV7VWLqe4+lahnJxOzORNAlLni3RZGNOdWJ0dyec=; b=SgfKVU45bIsDSc6qM2t+eq5mzz uygqYGqxeA23IDB81kxyy8p3Jol8JbrH7eJaCsAQfITFy1mv9Xs5K+km9oWnp8hSZW6rvlpGAeptr nNFYUBQ6nmV1FwbWjfEoJpmGQQ3HprGPM7sSBkHs5ZkeH/663GzkBS22Sq/utpJorCd5+OK3XzR7K /NnzTLvIjMsHNoyiqJR649acRIBm/9kZAyzKpwlP62VMgOklu+Cbvzg3+oZWz4MirlkSdWuCAyB0p AV6gCLker321KFUrpyXm/wPgL3pNESejKVO2ArmPH2VjVNxleOGO81ww0rL/uD/m8vlXjns5VVNOA 4jdS+awA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34974) 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 1oo2rZ-00072U-Ak; Thu, 27 Oct 2022 14:24:01 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oo2rW-0001aM-9x; Thu, 27 Oct 2022 14:23:58 +0100 Date: Thu, 27 Oct 2022 14:23:58 +0100 From: "Russell King (Oracle)" To: "David S. Miller" , Jakub Kicinski , Frank Wunderlich Cc: Eric Dumazet , Felix Fietkau , John Crispin , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Mark Lee , Matthias Brugger , netdev@vger.kernel.org, Paolo Abeni , Sean Wang Subject: Re: [PATCH net-next 00/11] net: mtk_eth_soc: improve PCS implementation Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_062408_677981_A8158A58 X-CRM114-Status: GOOD ( 24.59 ) 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 On Thu, Oct 27, 2022 at 02:10:11PM +0100, Russell King (Oracle) wrote: > Hi, > > As a result of invesigations from Frank Wunderlich, we know a lot more > about the Mediatek "SGMII" PCS block, and can implement the PCS support > correctly. This series achieves that, and Frank has tested the final > result and reports that it works for him. The series could do with > further testing by others, but I suspect that is unlikely to happen > until it is merged based on past performances with this driver. I forgot to say, many thanks to Frank for his efforts and patience in testing various patches to discover how this PCS works. > > Briefly, the patches in order: > > 1. Add a new helper to get the link timer duration in nanoseconds > 2. Add definitions for the newly discovered registers and updates to > bit definitions, including bitmasks for the BMCR, BMSR and two > advertisement registers. > 3. Remove unnecessary/unused error handling (functions always returning > zero.) > 4. Adding the missing pcs_get_state() implementation. > 5. Converting the code to use regmap_update_bits() rather than > open-coding read-modify-write sequences. > 6. Adding out-of-band speed and duplex forcing for all non-inband modes > not just the 802.3z link modes the code currently does. > 7. Moving the release of the PHY power down to the main pcs_config() > function. > 8. Moving the interface speed selection to the main pcs_config() > function. > 9. Adding advertisement programming. > 10. Adding correct link timer programming using the new helper in the > first patch. > 11. Adding support for 802.3z negotiation. > > There is one remaining issue - when configuring the PCS for in-band, > for some reason the AN restart bit is always set. This should not be > necessary, but requires further investigation with the hardware to > find out whether it is really necessary. I suspect this was a work > around for a previous poor implementation. > > drivers/net/ethernet/mediatek/mtk_eth_soc.h | 13 ++- > drivers/net/ethernet/mediatek/mtk_sgmii.c | 174 ++++++++++++++++------------ > include/linux/phylink.h | 24 ++++ > 3 files changed, 134 insertions(+), 77 deletions(-) > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! > -- 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