Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2640995lqb; Tue, 28 May 2024 06:24:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWkVCmi5t+5FtCiIlU8V8DjOg343MyMTGHhOwECMyGM4jE4ISDC1B/Hhi+tMX0ItJFTBcbko0pbzPsL4hevSe28LmXZr3Xg9sUbrbETlA== X-Google-Smtp-Source: AGHT+IHEjbKdFqWE8Wh2xVC6Bd3TjAANH45X8Mp58Wt8BHYhi5/4Wb7NW//7O2xPAqGtdkfbvsr3 X-Received: by 2002:a05:6512:3b86:b0:51e:2282:63cf with SMTP id 2adb3069b0e04-529666db5f9mr10212559e87.45.1716902644698; Tue, 28 May 2024 06:24:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716902644; cv=pass; d=google.com; s=arc-20160816; b=r4+BNwp4O+ebG8+cZ6bkUgYwwQ58ag7Cp3O9Mm8lwX+pERfqqY7bZaVLlC+oj2W6p4 mxpedRNwK2QWo9aN0uNU/Y0G0FvSTNpqq9cTVp4RLL45aGRkcCdluE/pZ/clqD9+VZqB QrWktBb6vlJR7hTGQjf9tKKqi1hHTc/NHdoc0hzMV7s2qKndCr9p5cAERtzex2TMNV0y 8LiGI8W/JGtmeTb1tm+Yjn9vhsczrIgFfw4YnAc2mOqZ9fq/tYarvdks2Ww0J1x4Wwg7 Ssm69Daoy7hT5McaDJGVIP2RmDLWUDGfyfnz75w2aEBXw95auSMgFJ+IPUjHexWX40Mv XFmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=czokYyi0W54VxyNcd6w6h3/QqzXqnKZPzDpLPxCZmeM=; fh=Orsi5f1/VmMp+h9CNEJCb5W7FMe6bPN3ngdws4WSmR4=; b=NaVMosaIMkTfv8vyFSiru2/idi0ueuspcWKh/LN9vQn/AFlVsRypacRyBQz3MI+mrz GdwHp2L1OZ0K6i/9cyMi/pXpj9XmChMkk+pAzN8vb5BEZJMdnOcIErCj3WaSrvyNO7If QTdNnobAGXJ2pOiERnBCwPj/Xeuxi72r0dT5yND1OnzeFsGDIslovbpHHQWwbTSya/Dd UVoIfVnRWPPXNPU2JtghUXSzpSxhA8qb19L8mv9vDr2p/Mb/Ht6GY3Cj+/H4RsRHOPb4 KNS0lecFidz3fqI70u4ocTI7aDADhoafr6w3P8Uxfeb2wrBCfy/nfpMljOngSztkZ72W OO7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=f5L6pwjZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-192401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6331c71b71si114912166b.992.2024.05.28.06.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 06:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=f5L6pwjZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-192401-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192401-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 68DFF1F22781 for ; Tue, 28 May 2024 13:24:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC6EA16F29B; Tue, 28 May 2024 13:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="f5L6pwjZ" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 9E3A116F0F4; Tue, 28 May 2024 13:21:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716902484; cv=none; b=SUB3gcpWLQK4eqfavhNIyPLUyiAGVSrKG/7KTEq4T+5UM8AvAzM0xVN4QLfv6MHUlJypGl+5UMslrshOs/NOwt85E3alWcStOMC4ThCN8A+O58jEl/WCqEbhwjGE/gVOPZ66nbUVo4aWFL7BXwQA8rV0DwIpJBERcnZgWy+1zig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716902484; c=relaxed/simple; bh=xN17DrOG0FDUje+V37rDrgEQBArqB1WqYIU/EaCXBN0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mEqbonxFNDJrGXtdU7LZJMydvHk+1txq42N4XpUWfaCNM1Id6BxFQjdQm3aPJUXJy+oA0hQ1wWzZSD/X/MaZd7eHsujSYnPEv7Auag8chamRje7cdLaOeB2NFDxRp6LrD1pGG15mPGKdRkEG08cM7NdWl/eplScK3cCBewWhV1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=f5L6pwjZ; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=czokYyi0W54VxyNcd6w6h3/QqzXqnKZPzDpLPxCZmeM=; b=f5L6pwjZ7szzMMd61aNL9N3pOa 7jw/7ztZTkCBUebQSy5i2gdXOPkpAcEySvQYdOBIze4bWKy53CiAgWr+AJUyov57gZhHnjpkfs9cD WS8HR5V9Ea7XcKjrAFM0uxn88y3KFYAYpvwHJnWKdq6t8NYk9W42Bcgk0d1fzosFOnDU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sBwl3-00G9s8-Mq; Tue, 28 May 2024 15:20:53 +0200 Date: Tue, 28 May 2024 15:20:53 +0200 From: Andrew Lunn 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: <775f3274-69b4-4beb-84f3-a796343fc095@lunn.ch> 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> 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 appropriate. Andrew