Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp869750rdb; Fri, 23 Feb 2024 02:40:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWH7mbwUE8ZeHMyNIknM2SSlQEqODFeUa6bCRFluaRU3spPNhPZmUWJovyygrvhJj9AyOGqgHFxYpLsrGM1HjrZJMFf/bkuVlObZnyMIg== X-Google-Smtp-Source: AGHT+IEPeEPe82+Bt8UQZTrQm4OISD9B4IT3gj/l+YKfvMTI39P4RgvVbe6fR5f9knQI5nil42Y/ X-Received: by 2002:a17:90a:a405:b0:299:3efe:8209 with SMTP id y5-20020a17090aa40500b002993efe8209mr1158996pjp.4.1708684859389; Fri, 23 Feb 2024 02:40:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708684859; cv=pass; d=google.com; s=arc-20160816; b=xIUi1zVNvLOeCVgX3hWehlN9sU4X5tAZP57lhRsFmuyMg3OCojIqNDgnTtt6htxMQJ AjrVonng4GdPN3bUqDFo6CTsp3TPDWqLP++X6Gg3C8spzisivVn5ED9j2JEgozXE+st/ 7Uv4Qe2XLZM9ym+6pXdfIIqUhqe+iBx93Jt3CZeEd3D+gcDzHbqq0bvMmz1Wg3FDAyP1 9GYssn1P1QRWyXPyGQQAMICRuRASPvmNxm4igdp/RIIqIkkolrPTVpMdFzA8Lz5qyz8d 7UB8kWZpR+uG+X77pqVDCx8DQrwMpj5nLRoaaojqzSftTbJ6S2rF7d+OAvgFHwvw1p2i qPaw== 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=STbccEumsUwS1x3Lag48jXHMfPCnA9k9jkVStMkjKiE=; fh=h+u1NWlZSZdxB6zdg/vVFE62W1ussezizzT8mHzgow4=; b=Jb7nd5Tcw+EHoQm1Ltse24IA7KhfEogLMENc6z9yXrXK2bvvRszTsjlumdi0I6jMk1 noaYS4/vQ/t74MTjv6S+KwB94Eb5FWj9eZj5KG37ogsqurlUkSu4s9dm1hZNTz0kqrOV yb+IiwgDTMw/lQfqptznc5CXG7IPVhGLV6wsoIUPyPAtGFaxpiDs6ZWmcPkFcIQg35Cz UsFKA0HtWibU8JoR1WE/FyRhQrI88vM0skUzXYU2/vRxHNOe79wOndsQ1hMp8f0FD7bD CYqx2bV33+NnXsHmnzJvsMtc0VrEs6rFjifmGXRc8VI9Q/FXD0dLRXyehSRvaI9xJgR7 liSA==; 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=I+Y0fxKd; 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-78153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78153-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 sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id cq6-20020a17090af98600b0029a08cabff3si897266pjb.157.2024.02.23.02.40.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:40:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=I+Y0fxKd; 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-78153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78153-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8D79F2875A8 for ; Fri, 23 Feb 2024 10:40:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4407B7EEE6; Fri, 23 Feb 2024 10:38:43 +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="I+Y0fxKd" 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 E862D7E772; Fri, 23 Feb 2024 10:38:39 +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=1708684722; cv=none; b=EzJ22EYaiWhTMPOCzsvWlu4EzJP/W9gFrXnh3b1uG5OOqCVntNFPtJGvH5Pv92yUzSJ9ZAXZkRbCuTBP54LG3lnhSOodYkl6NAh63tVwpCdgpiTxGW5dVJsSAWQE/DWAHTOM/4tFH76h+XIZKNUbsNk6Qv6EJS3Xij+9WWuNon8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684722; c=relaxed/simple; bh=O3IrUyblnuX/5xQB5jaQ38QXY1p+GizHIVBUKzOy3jo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YcvG7LRJ8f11pm8aUWcuQUh5L+Y2MxatdINadMAXyQxPvROsQ4e3QVgOV/UGAPVhDMfMRnmaujlghxl6eW6RWkiNjihwngIxs3aT9y4xgZE+KvWCcHMbS4x6bemd7ycFrgJhNH+P8Lc9c3GVU5xEJ6lSkZrd2l1s/ykr7k1NbIQ= 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=I+Y0fxKd; 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=STbccEumsUwS1x3Lag48jXHMfPCnA9k9jkVStMkjKiE=; b=I+Y0fxKdZ0Sd2vE+QThwFWzwIQ GIC3VHV/kqid/e+7zPewniD1+fDQYmK7Kto6z2uVk+91xhO+qLhJ8hLLJGjbseZ4/hrzWeJne84Wn RJR0NE2jiV1YANZNlnIF3uaNRWttSvCl6XFm77qKYuiuD519Y2CY7dqGANuet0/qD7Nk8wyNDlwJd p0dPUqB5NtWAnOmjAB9rcDkxn64ALbRU5GnA5vgxVHGnLp2RVAVFTVuz9JpSDeTxGVMfF1Vj2MTQK fJ4m2QbZ+0XnePYFaHkrrb4nErWbbfogTtSDUrugzQAG7tJG914q0SEJImRSbmk3YYJ2TwaAP6COC LhkXiVYw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46402) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rdSwi-0007Tj-0G; Fri, 23 Feb 2024 10:38:24 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rdSwe-0003Y7-Lq; Fri, 23 Feb 2024 10:38:20 +0000 Date: Fri, 23 Feb 2024 10:38:20 +0000 From: "Russell King (Oracle)" To: Oleksij Rempel Cc: Wei Fang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Florian Fainelli , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Shenwei Wang , Clark Wang , NXP Linux Team Subject: Re: [PATCH net-next v6 5/8] net: phy: Immediately call adjust_link if only tx_lpi_enabled changes Message-ID: References: <20240223094425.691209-1-o.rempel@pengutronix.de> <20240223094425.691209-6-o.rempel@pengutronix.de> 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: <20240223094425.691209-6-o.rempel@pengutronix.de> Sender: Russell King (Oracle) On Fri, Feb 23, 2024 at 10:44:22AM +0100, Oleksij Rempel wrote: > +static void phy_ethtool_set_eee_noneg(struct phy_device *phydev, > + struct ethtool_keee *data) > +{ > + if (phydev->eee_cfg.tx_lpi_enabled != > + data->tx_lpi_enabled) { > + eee_to_eeecfg(data, &phydev->eee_cfg); > + phydev->enable_tx_lpi = eeecfg_mac_can_tx_lpi(&phydev->eee_cfg); > + if (phydev->link) > + phy_link_up(phydev); I'm not convinced this is a good idea. Hasn't phylib previously had the guarantee that the link will go down between two link-up events? So calling phy_link_up() may result in either the MAC driver ignoring it, or modifying registers that are only supposed to be modified while the MAC side is down. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!