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 2CFC0C41513 for ; Wed, 29 May 2024 08:49:07 +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=2x0XysvIDMgtSBy1z5+7TezWVxq33Rr74K+imBP/diI=; b=iief6g8aUAmRdz WTgDtr2EaPSBx3mTI5ZfjU/ecYSgENTvuVxVwNTmUdMMTMKvMlimusBTN2MswY7vbaU22Is9KCR5x 1nxgRsmZ5+48o0EMS7ACUEO2TBB0H0btWHPVZZNFayEzsmbnjquouiyN5Wr7SXVihFQnMYmDkomsP kyGumnJjE2zoJq+PjS0ll0HGP57F245qoDXLLrDmWpGkcA273omWTmqwuTAG0r6f8wJzXvf54hc4Z LxnfnWoAQaJ8TJPM8oxkeMy+qtzZeL6Ks9S8aCxGYk0FAC4cO0HqSvf7Z9vPvFbXtfFdXcOYAYkYC Uav0t3S27npr1kdidVCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCEzT-00000003VkB-2MD7; Wed, 29 May 2024 08:48:59 +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 1sCEzP-00000003Vhx-3s6u for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2024 08:48:57 +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=fy/VN4d93AK58QWLNniu+JNSSAyKTkDFLr45JXQ5Bzs=; b=DXkkWZ0Esh+3Ku43CUqs2kR56L S6ClNqQdm5L+GJn4agj4N/jzOMZFcWU8Z63sliv6R3BbOmaZIT02J4lW10dxZKzutKDSZlejmv0v6 TWDISFNFG8xPNlA+SvivbcenRpCITMm7RCgKRUmzAB8qzmP3GZwlvSzhs3TeGj/nLKcLkz3O2keNg x6+Z1FMLu8UGhaXMvpZdGvGBZm7qO03SYsBqTbRvkAYzsy1yoMBdK6v5C5/LzHyWdGbiT5eOO1yLH 5IfQ91PmRDXwsaPrF8+aXvmcWB8Nbfqaa72v326Wl+nElipaL2GTnXWbA+PW+4xscr1gt0CxJmT9O eWlU2d0g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:38530) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sCEzB-0005qn-1p; Wed, 29 May 2024 09:48:41 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sCEzB-00045O-Pl; Wed, 29 May 2024 09:48:41 +0100 Date: Wed, 29 May 2024 09:48:41 +0100 From: "Russell King (Oracle)" To: Andrew Lunn Cc: xiaolei wang , alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net PATCH] net: stmmac: update priv->speed to SPEED_UNKNOWN when link down Message-ID: References: <20240528092010.439089-1-xiaolei.wang@windriver.com> <775f3274-69b4-4beb-84f3-a796343fc095@lunn.ch> <98e6266f-805c-4da2-b2dc-b25297c53742@lunn.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <98e6266f-805c-4da2-b2dc-b25297c53742@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_014855_983188_CB3CF20F X-CRM114-Status: GOOD ( 21.80 ) 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 Wed, May 29, 2024 at 02:57:27AM +0200, Andrew Lunn wrote: > On Wed, May 29, 2024 at 08:22:01AM +0800, xiaolei wang wrote: > > > > On 5/28/24 21:20, Andrew Lunn wrote: > > > CAUTION: This email comes from a non Wind River email account! > > > Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > > > > On Tue, May 28, 2024 at 05:20:10PM +0800, Xiaolei Wang wrote: > > > > The CBS parameter can still be configured when the port is > > > > currently disconnected and link down. This is unreasonable. > > > This sounds like a generic problem. Can the core check the carrier > > > status and error out there? Maybe return a useful extack message. > > > > > > If you do need to return an error code, ENETDOWN seems more > > > > Currently cbs does not check link status. If ops->ndo_setup_tc() returns > > failure, there will only be an output of "Specified device failed to setup > > cbs hardware offload". > > So it sounds like we should catch this in the core then, not the > driver. And cbs_enable_offload() takes an extack, so you can report a > user friendly reason for failing, the at the carrier is off. It's worse than that (see my other reply.) If the link speed changes, there's nothing that deals with updating the CBS configuration for the new speed. CBS here is basically buggy - unless one reconfigures CBS each time the link comes up. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps 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