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 2DF24C27C53 for ; Wed, 12 Jun 2024 22:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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-Owner; bh=kcM7+sEl2fFtdltwBxi9L6LdwhXB7vjNBltenta4eBs=; b=dUADMvTj6rxbhq2fUgNaipy0Ve gGPQc852DbLa8nK890n0jVsFbGNaZDi/5iwmW6ohBc3dSXWujZSvpNS/a1YK7YHG3UeQrwD2z45XM NYt/fgtB37wbimJqHXzXhSxCptQaGVNWkW687uL79JrviPbpE3WloHM7mSmiK6cXyPAXwK0sE6qFL ur/rzNzLsPXtIfgrnSca6i9N6sExFcZUtDl7o2F63wnb7VVFV2q7PDG8PaHda9jmOhjsSx4rapwRV zC3CEZ93WSHUk09JNW2JtPDOj8jNjZP7wfTk1rVKZhXCpWI+TjahjX0rVBvLuQ9jXNepXs2n+obYb XLwIFF9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHW59-0000000EHTx-0Igh; Wed, 12 Jun 2024 22:04:39 +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 1sHW56-0000000EHSq-0SEK for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2024 22:04:38 +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=kcM7+sEl2fFtdltwBxi9L6LdwhXB7vjNBltenta4eBs=; b=CcbBKjLiXhLREV1DtlLUuXLQWG Lkgv/zS+RKzvgZr6Hp9nxNfB7O0+apKF7edBOOYqoMJHuKsgbfjED2tFL98Cv5769y2JLYcaOM81M J+CyhYO///NBcralWWbtz/j1gRfMPOq4owKPgPDIC5dW9jSAFKJOnuYTVhFK6y4a4+5tUuwntPyh0 PIDf0oZCPiroRD0Ta/yi3NosUmU8eRttqUZLeBX3ItcKhlOnmA0gLRCbeO6BlBNCRXjnhVrl/M8ut oOG2K/KjuuiHK6GQ71EtgGLqBcF+g6t/eBsuEoAYRpupTDiDcgaxqriq2I6CG6QN2ih+zb74CexwC 8/SJ0O/g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38598) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sHW4h-000580-2f; Wed, 12 Jun 2024 23:04:11 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sHW4h-0000bC-Bq; Wed, 12 Jun 2024 23:04:11 +0100 Date: Wed, 12 Jun 2024 23:04:11 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Andrew Halaney , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH RFC net-next v2 3/8] net: stmmac: dwmac1000: convert sgmii/rgmii "pcs" to phylink Message-ID: References: <6n4xvu6b43aptstdevdkzx2uqblwabaqndle2omqx5tcxk4lnz@wm3zqdrcr6m5> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240612_150436_466337_DAEA4DA8 X-CRM114-Status: GOOD ( 14.41 ) 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 On Tue, Jun 11, 2024 at 03:25:14PM +0300, Serge Semin wrote: > Hi Russell, Andrew > > Should we have a DW IP-core-specific getter like > stmmac_ops::pcs_get_config_reg() which would return the > tx_config_reg[15:0] field then we could have cleared the IRQ by just > calling it, we could have had the fields generically > parsed in the dwmac_pcs_isr() handler and in the > phylink_pcs_ops::pcs_get_state(). pcs_get_state() is not supposed to get some cached state, but is supposed to return the real state at the time that it is called. There's a good reason for this - dealing with latched-low link failed indications, it's necessary that pcs_get_state() reports that the link failed if _sometime_ between the last time it was called and the next time the link has failed. So, I'm afraid your idea of simplifying it doesn't sound to me like a good idea. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!