Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp496702lqb; Wed, 29 May 2024 01:51:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoEWtU8VB53GtClGMKLngAyQXLfatYH12UXU9uAljdLpTOVrHWdCv42LdGJRjrlOMSDbZdrSIV+L3ifYftFKoBlI6I/rG/ecWKKL+KnA== X-Google-Smtp-Source: AGHT+IER6OtJGPRc7A3ycbc4/duIQzJyc3I30Kf9PQHIOr+cqIqH1v2612S/xD49YvGHzBmArvpZ X-Received: by 2002:a05:622a:13d3:b0:43e:3d52:3e12 with SMTP id d75a77b69052e-43fb0e854f1mr148012131cf.35.1716972697838; Wed, 29 May 2024 01:51:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716972697; cv=pass; d=google.com; s=arc-20160816; b=TWxpGEwOFLNb1hhscmvMZedZoSowQSE6zf4YEiZH6Eb3V3nzt+Q1z3L1xvbSyrIwlS CLTm2OObsLa/YxxnnRRTxFyMl/0o0kj/1n6SaH2QIaX/vgwwpGE6RQveC0MvNtQto+Gw baHUA7XPFf0JY8ogQEWMtd1Do7WdihOK9CvesW9m2eF8AovTue80no8VE+RPSyvjQ7ci livnlSoYTPYkv8WbY0k/O/9qqjlKroxIl+vyi0DIJGfIzyyjQvIQZTouqNIe/v50DyZ8 Kzzm9IjzE667EEbT+BXnqo0Rw7co4yx4IlDoCF8Yh6DA9RYYO8xAveFNbd2QYQqsmj1k XlNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=NDBP5MjscEqYWSfB6IwDfvlV49qbL9VUtfUm5r9opnU=; fh=Orsi5f1/VmMp+h9CNEJCb5W7FMe6bPN3ngdws4WSmR4=; b=cFQ7qjCxnsqQX3Mf7PLbC+RUvuL2MmTP4rw79LwqcIO1uhSTkCG5emTwGgfvJBZNsP Ri2Xu5MvdQCYaR7iKn8A7iWx5oDfGwioV0e4PgNF0Qoj+VBshUoP2m4PVfK+0gcwYtGl PDqdoYhUE3KOC2b4OBMOdADXkhGCh8LLBseBL2a7Tcy8BOgtbknTqiI2bvsl3yn1E5BX XGrkkSWhBeAsry1sgJ9zkmjzJrh2xxbchCl0hCcmrOhMWJ9rKtSN7aNUVeViqAmNCMNH 6ebFBs0r3YJZyKojghto7qP/TyMIVx04CtKKs04vbUQPv7u2lLK31AxQC2La8ObpJW7/ i5+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=c8CaiQOj; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-193792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18c5a90si122021211cf.568.2024.05.29.01.51.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=c8CaiQOj; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-193792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 91B761C23529 for ; Wed, 29 May 2024 08:51:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A3B6170832; Wed, 29 May 2024 08:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="c8CaiQOj" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7865168C2A; Wed, 29 May 2024 08:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716972433; cv=none; b=ACeLYyrmlQdMGW9HBdRE3nJO/xUTHSFu6uSXLuzLxAiqWEJcUnUxuqOgibwBJBTkQijoQ64QFt41qQldygrROlP3Pxe39PMXrYbyFIe+x9mBZe6OoM3jiY/eUQnSIFBQ8KDJNd0b5bjZioMM6fLjKsrigBQxCKo9bQHeHTXKu/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716972433; c=relaxed/simple; bh=i012pIJmMwpVMNC0wVzKWfXKqOZHs0negPRQdj4uoV8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZHDG5fym91F0v0Lu+fAlI8SqwRaKkgas47pHlMx0jmDVvWlZtBHw4WROZ5eymrS/7WOLp508Huhb645gjB4aQMdg52mqaOP3n6b3swG59wRAeY1cIBFRKvZM/k5zU5N6QZC3ZVd8Y8DP31qq9Xeh6okn8Wpx5JScOLeH01zX9jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=c8CaiQOj; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=NDBP5MjscEqYWSfB6IwDfvlV49qbL9VUtfUm5r9opnU=; b=c8CaiQOjxsu+TIUsAK5E2w+ydd FUFKddMHwkoZbFRpXmCCrbcFGj0VCWJtJuofeH4T8i0u5YHKfsrpCnS1Ffgz5KbCq6BkfugA/Bmr7 BcQnArMqOQ3DueMHpPiesrUuV3jyoievmpMITqHgN52uTgOFdyvJ8xIoQmS8Mb+oRogtnCd1mgr8a Jv/Fpz6b+quoMVKOIjxrfO10NHhpfshcYr8sWWCo1BftTDEGFUhm6xvOgEZljYlGIcI76PKva+rmK bkb3BAY0lmDsMzk+6bH/IAvydsr5BdS5teIEZYZaNZFBOcxL3s4v6x5POVHQ1VNxiOPpzyVn/BF/D DmLXQesQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54206) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sCExT-0005pQ-16; Wed, 29 May 2024 09:46:55 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sCExT-00045H-Nq; Wed, 29 May 2024 09:46:55 +0100 Date: Wed, 29 May 2024 09:46:55 +0100 From: "Russell King (Oracle)" To: Xiaolei Wang Cc: 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240528092010.439089-1-xiaolei.wang@windriver.com> Sender: Russell King (Oracle) 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. > The current speed_div and ptr parameters depend on the negotiated > speed after uplinking. So When the link is down, update priv->speed > to SPEED_UNKNOWN and an error log should be added. > > Signed-off-by: Xiaolei Wang So what happens if stmmac is connected to a PHY that can negotiate with the link partner, it has link up at e.g. 1G speed, one configures CBS, and then the link goes down and comes up at a different speed? I can't see any way in the stmmac driver that this is handled, which makes this feature way more buggy than you're referring to here. It also means that with your patch, if one attempts to configure CBS when the link is down, it will fail. To me, commit 1f705bc61aee ("net: stmmac: Add support for CBS QDISC") just looks very buggy. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!