Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2037412rbb; Tue, 27 Feb 2024 08:45:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWw1PXr2h0pQjw+v83U2ReRRd4lKT8FD25B6DmrWjxm804O9MHBZSiA8k/OB2OrT6QEmgtCkIM7eQPJGmVUS42UiDBTKcYcnS55Vz0CQw== X-Google-Smtp-Source: AGHT+IEaiLhG2vuG5Z0hrDlLc9olqu8nZLN2oJJfknXlbBCAdSvII3A3OTGy+nWbJFJxm2L3CQZU X-Received: by 2002:a05:6a21:920a:b0:1a0:56c9:60ab with SMTP id tl10-20020a056a21920a00b001a056c960abmr3061184pzb.44.1709052330987; Tue, 27 Feb 2024 08:45:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709052330; cv=pass; d=google.com; s=arc-20160816; b=YsQTZioMgJU3+csS7YmKBDIoijV93iX+QVc35Met6281ciSNpHoQOTgX/R/PkjEKZA FahRbq0vmrlBK+AB/p81xgvJVlxKX6ve13DAlph6b4fQZk+oBmx/vj3X8eFLHPZ+8aS+ 6pgGjBSDipOuxGDU50SG20H41jaYpFyI7kH5Ef+T9GuC/Al6aJeP4mVDVRPOTXFsLMXS y0EJeeT80PvWaqn/rmFnTLc8p0QiyCfmnfXtiA4fnbcZvUvwWDGkC/jfW+G75O3J89Xr ld92zrgVuUwDlWVFMI9Akp6IuEhHxis8JHyvYpOhKzbRrtOV1MzreTC0zX8LFx1lCR4j Gaww== 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=JOoRwSmiX4D2HjFfMhasejwRBKICagkGvcW1hfqPDeg=; fh=yrXjjO2He8qXBmkaUuozBQ44ip1VTWZMKA8ATIoJDZw=; b=K0BKpvd0Gmry2BAJM1dKB6IitbtguUv0xAG6hU1Bz1K0xuLSOZ2MHHArlPOkPg+rwi /Ag2DjimgyeXPJDOXB89h2CTpGkkYo9KjRVY1+9qS2/LhahAJ6WS/ItC8jySU7UWOhSU Gxl+Vh9gvjBiEQkzSKsa/j0m0gEkhXDikPT+Z0G84FTdyKkw3q1sYGkC+8FEU/1SROwN Fa9BG3vZhJ+KPyOAbs5eYNSwpCgYzgBZ30L6UG2YZ+cdovwYAF1mIimm3sz+VuPojNG7 3UPM9y0Uw1lpBX7WXGwZO+QVG7oWXRTBAwxUCu1aa3CXp693o6M3KGeF11OtoD47DpQN NhSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=SR+lYKpz; 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-83573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n129-20020a632787000000b005e43cb39729si5727009pgn.870.2024.02.27.08.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 08:45:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=SR+lYKpz; 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-83573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83573-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C6B22B30670 for ; Tue, 27 Feb 2024 16:12:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44D15148300; Tue, 27 Feb 2024 16:12:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="SR+lYKpz" 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 A931F14533F; Tue, 27 Feb 2024 16:12:10 +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=1709050333; cv=none; b=G5ZI9Pxc8hWkFpsdDHJZ5a3kZhvxWciZii+NbRYv5D/pg8QwYdjPW6jekys8NHHu58UqGnZK3jOe5Yg8SSgFnD7JhD6/efca8+uLeymbNEFy0aSspRuLJcRXcRkJ5jfGiXvbku30wgKB9jWiC4od+Zx1cAJdXMYEqu3Khs3fo94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709050333; c=relaxed/simple; bh=19neBC5EubG6CbCXy05obvW+BJGJ9FEAr9hCMDGwxUk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bl1QeAyam4eaQzQNNYuyu4CRcEwrm68mx8Fi9enN3SlBD41aBq1+/2Q9HiVegjX91GTMvdMRDu6GA8PuLaypv6Yb1e3I0Agvkpx05tViuMFoU6SnL+6ydcekkJA64ohcXP9oby6IcJrs/zyDBq9V/1MMYD+7sqbr3GqPy4ZhWEI= 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=SR+lYKpz; 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=JOoRwSmiX4D2HjFfMhasejwRBKICagkGvcW1hfqPDeg=; b=SR+lYKpzMzfnHjFr6ZK8w1hN5I lK42n7hCpMubD5Q3ThZUr9EZ2ENNz3bUYw7iZnPWP2b8rZTw3DRcjVLsOnYm3fbz24oX9R5ligiy+ 5MzUFjRtEsU0mswqFrhXv2/eNphoJWszK14STiGGffTJg8BotbsfU7V+dCy6K3DUBv6U=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rf046-008rtK-Mh; Tue, 27 Feb 2024 17:12:22 +0100 Date: Tue, 27 Feb 2024 17:12:22 +0100 From: Andrew Lunn To: Oleksij Rempel Cc: "Russell King (Oracle)" , Florian Fainelli , netdev@vger.kernel.org, Clark Wang , linux-kernel@vger.kernel.org, Eric Dumazet , Shenwei Wang , Wei Fang , NXP Linux Team , kernel@pengutronix.de, Jakub Kicinski , Paolo Abeni , "David S. Miller" , Heiner Kallweit Subject: Re: [PATCH net-next v6 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Message-ID: <8d48af5b-e92b-431c-9bc0-ce6ef0e0ab2e@lunn.ch> References: <84e1368d-ec6a-48af-945b-509528c45dff@lunn.ch> <6af3406a-7968-41e5-bf6e-71d020d8b28a@broadcom.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: On Tue, Feb 27, 2024 at 06:35:38AM +0100, Oleksij Rempel wrote: > On Mon, Feb 26, 2024 at 07:59:28PM +0100, Andrew Lunn wrote: > > On Mon, Feb 26, 2024 at 05:53:31PM +0000, Russell King (Oracle) wrote: > > > On Mon, Feb 26, 2024 at 09:50:02AM -0800, Florian Fainelli wrote: > > > > This is the source of the concern, we don't know which MAC drivers we might > > > > end-up breaking by calling adjust_link(link == 1) twice in a row, hopefully > > > > none, because they should be well written to only update the parameters that > > > > need updating, but who knows? > > > > > > Just quickly... There are some (I went through a bunch.) They don't > > > support EEE. I haven't been through all though, so there could be > > > some which support EEE and where adjust_link() with phydev->link=true > > > twice in a row could result in badness. > > > > So i think we all agree the MAC needs to see a down/up, even if the > > link itself never went down. Anything else is too risky and will > > probably break something somewhere. > > Means, this patch should be dropped. No. This patch handles the case that EEE is changed, but does not require an auto-neg cycle. If you drop this patch, that use case breaks. You need to extend this patch to signal to the MAC a down followed by an up. It is a fake down, the media side never goes down, but the MAC needs to think it has in order to keep with the usual convention that we never call adjust_link() twice with phydev->link not changing. Andrew