From patchwork Sat Jan 11 20:25:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936176 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F1A1494CC for ; Sat, 11 Jan 2025 20:25:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627112; cv=none; b=jGjq1JbBEi9b5DrTTCcZ/4BNJbGluswvsOn2fFfvvYRj/bygaFfB/N9AO3UfmOPCEpPFabqzs53AI2RSqlXnLPCtIHMhOg8dMGOvkCnMsg9IP8jwy8ylDFtl8RQQRanPfHESjEV0fxKG9oMukhHxVq8duzX2EvYKEPItXWIqNL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627112; c=relaxed/simple; bh=Cf7M+ZMP4gSExHOq6C5BklT7emUjrLT48BvByhJ+frY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=WlF9N8wstd6AAA1jeM1wbnCfD9xnFagTLIW5miLB6zU/OhIhntQVgURN8/GtxDYkqddM+2zT5W61xqxOIV/i0Wv58ORX8UtSBDPVnPaoWAbwuOF+CbP/kAxsze9Z0UUCI6M0AALyNOPOmDxFeFCt+Ohgiyymklth4/MuQjgK6mQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dcyJ3Nm0; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dcyJ3Nm0" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-aaec61d0f65so578238466b.1 for ; Sat, 11 Jan 2025 12:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627109; x=1737231909; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=+CM5019PVqbCfLD5uBLhFM7h6xi0D3irHgnC4Bb8RcA=; b=dcyJ3Nm0A5fv83tibf77P3lcAxnghu57XCiO3ah0cQZcBaPt9vL25IF7ZZ4rGvhSxR 524Pz9MFwNQM7MMmvyqMR4XdQRRjpGNy2O8cFwTFIyZWOha/q2FQ3L97hdbe3kdSXF8s 8A1PyLZ9P1r7lPK411KCtBVhX5Th9rAWU0778bsZ9xFdJBcXb+h5rFLHkk+UsT3Yx1gI a2WvQRpZymUmWKKCAsaL3rv/mE1A6JT5hHgijeH5LErtvtF6wE/TAn8RI3BzLlmvt+c8 KcmivR40edlbrIANQ0AxR+wu2zvGnCy4TyphObSs5k8gNhxHDhcPdL9xz0hgAU0d0JcF CcCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627109; x=1737231909; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+CM5019PVqbCfLD5uBLhFM7h6xi0D3irHgnC4Bb8RcA=; b=vPHc/ITDSJmI3hO5IMQYnu4LAMJtZgWDNPa6u08CTEooepxIW5Qc0H0yYhoc6ed6Im 32Ryryq+ziA3ngTHKedPmrwLQtdJpuEWXWtdBroafYGUhP6LGBVNwaBHn3UlRHruUXby 2V5ldRGNVwyXIZxihiZGK5tuE8s6MRH8+cnuFEpsGvkC/wT3Utjtbc5gY7uG0yqDy2KT HZxjxdDQhYruqv8IE/GcvZOcyQa5G5pSJ4A1iFUktBUno3fcf5264UwMmaHu3GyC9a+Q iKBc5DNMGqvTFvvEibn04U1xJPzmIfu4H/NXW0syKClVUVtQdTt5QussUj1/0c03NiFO u0bQ== X-Gm-Message-State: AOJu0YwRiZeZRSsUi2A9LAxhSVfBlbsbVUR0H7OufFxsYttnIH56lCNA kYWlk2Zr7jmEStJkOPsDQPns3wTGvs3WIXyYV8C2GbQ7HTp45TUa X-Gm-Gg: ASbGncswgk7VikCWg6gZ07Fqq1Fd+mKNED716khPqcKRsk+xBYDoeq0twY5NeuD3PQd HQjzhlXz3T+1NooYms++ozZ/1+ATBeiVWGkNd+rP0JcbdFpGVDvwJV9XSHBLH2OFi7IJz7Lvyf5 7/iAVq/fdZYmBQYTe5S7FLG5JlKlYF3eteuPPGJMv7GBoU82yQqfpIyCMLSBmPHTBL01lGcV0AC K3QT8Em68DCKKpBVcGfSnBQEjUjEYe8Ck3TXldM/Op7QGidr5CaKeLjduixLw2PNb1jJFl4XsD6 Ji+0JSlhb2Q7XV2ZgjmTJU/UbekC2hpp2KszIycjNuooVTIq7Z7dv/1FjClOq/YENYxwSOu0LK4 RWasoxd2czDCQXm44LfFOGcEGKdTHbd13Lp8hh0V0M5vFr4O+ X-Google-Smtp-Source: AGHT+IG1s5Q0+FOAVx5unF/PLn5Am0UqPlCagn4vpsbXlMSlulv9sNSCaWQObCgBTrXPbnWKsu37ZQ== X-Received: by 2002:a17:906:4c47:b0:ab3:974:3d45 with SMTP id a640c23a62f3a-ab309744224mr95008566b.1.1736627108810; Sat, 11 Jan 2025 12:25:08 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c90da0d9sm307099166b.67.2025.01.11.12.25.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:25:07 -0800 (PST) Message-ID: <00f74027-a714-4c7b-b94b-dffed49e4315@gmail.com> Date: Sat, 11 Jan 2025 21:25:06 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 01/10] net: phy: rename eee_broken_modes to eee_disabled_modes From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+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/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org This bitmap is used also if the MAC doesn't support an EEE mode. So the mode isn't necessarily broken in the PHY. Therefore rename the bitmap. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 2 +- drivers/net/phy/phy-core.c | 2 +- drivers/net/phy/phy_device.c | 2 +- include/linux/phy.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 0dac08e85..468d24611 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -686,7 +686,7 @@ static int genphy_c45_write_eee_adv(struct phy_device *phydev, __ETHTOOL_DECLARE_LINK_MODE_MASK(tmp); int val, changed = 0; - linkmode_andnot(tmp, adv, phydev->eee_broken_modes); + linkmode_andnot(tmp, adv, phydev->eee_disabled_modes); if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) { val = linkmode_to_mii_eee_cap1_t(tmp); diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c index 6bf3ec985..beeb0ef2f 100644 --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c @@ -388,7 +388,7 @@ void of_set_phy_supported(struct phy_device *phydev) void of_set_phy_eee_broken(struct phy_device *phydev) { struct device_node *node = phydev->mdio.dev.of_node; - unsigned long *modes = phydev->eee_broken_modes; + unsigned long *modes = phydev->eee_disabled_modes; if (!IS_ENABLED(CONFIG_OF_MDIO) || !node) return; diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index bdc997f59..f6a5f986f 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3016,7 +3016,7 @@ void phy_disable_eee(struct phy_device *phydev) phydev->eee_cfg.tx_lpi_enabled = false; phydev->eee_cfg.eee_enabled = false; /* don't let userspace re-enable EEE advertisement */ - linkmode_fill(phydev->eee_broken_modes); + linkmode_fill(phydev->eee_disabled_modes); } EXPORT_SYMBOL_GPL(phy_disable_eee); diff --git a/include/linux/phy.h b/include/linux/phy.h index 5bc71d599..c5dc2dbf0 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -629,7 +629,7 @@ struct macsec_ops; * @eee_cfg: User configuration of EEE * @lp_advertising: Current link partner advertised linkmodes * @host_interfaces: PHY interface modes supported by host - * @eee_broken_modes: Energy efficient ethernet modes which should be prohibited + * @eee_disabled_modes: Energy efficient ethernet modes not to be advertised * @autoneg: Flag autoneg being used * @rate_matching: Current rate matching mode * @link: Current link state @@ -745,7 +745,7 @@ struct phy_device { __ETHTOOL_DECLARE_LINK_MODE_MASK(supported_eee); __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising_eee); /* Energy efficient ethernet modes which should be prohibited */ - __ETHTOOL_DECLARE_LINK_MODE_MASK(eee_broken_modes); + __ETHTOOL_DECLARE_LINK_MODE_MASK(eee_disabled_modes); bool enable_tx_lpi; bool eee_active; struct eee_config eee_cfg; @@ -1324,7 +1324,7 @@ int phy_speed_down_core(struct phy_device *phydev); */ static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode) { - linkmode_set_bit(link_mode, phydev->eee_broken_modes); + linkmode_set_bit(link_mode, phydev->eee_disabled_modes); } /** From patchwork Sat Jan 11 20:26:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936177 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E8BE1B4F15 for ; Sat, 11 Jan 2025 20:26:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627167; cv=none; b=UVf84Ec1zVu2LJd81+maoUt/L5Z6m2ILK0TL0sLyqHQw638vTcGSlQwtxTDuAiMPjslJEQ/vGfwaC3DuB56JvSYNdb0ckfSiZaehXYSKO4sJNI0U0OosIR04VpRqcRy0+BC3aEkWph6xdI/9hsuiqrHOKPangRHrmhHK4xs8UIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627167; c=relaxed/simple; bh=EWAYERHtUNysaHjwIGobdCdTOhWtkr0aHok8S4aBOnM=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=bj+3YEb94OKJZIa4Eke1BMGvJnsiT96iWae1CTpBFW05etAjSHDH3bs6Wnw+TcdDTH16hdrZnyZxuvk41rNjIc54xTKYpsYAjR+NU0bl3slhAQ3+StOhnBeDGxioRrZ2nPD2VYsnyIWe3TowFCXFbLLQ+jM0nh0X1H9JkHYYcec= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HW2CiRcq; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HW2CiRcq" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d3bbb0f09dso5425693a12.2 for ; Sat, 11 Jan 2025 12:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627164; x=1737231964; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=1vMWGZGJB0wSpyvnBU07N6sSx7cJJIas5pZC5dMSmqM=; b=HW2CiRcqPoqL6saNwtQO9TGSJFjWQGKw7QLPbGGTp0U+PxS8hvIxOqoW4zOigxKzOd TXQtuyTDs5fS4vm/KlqyFvWEKSRa1y1dA5DsHzYipkGygBNFg4wCqqsO0FMBQEhhVx2+ oQiMuSipIM2CwQMT9bFU2woa9jB9MZhjpvYnbU1lNvqmI82sS9J+cuBzS35o/Gj1p3f/ MsIKXtPZLbVS2a4j5BSisDGqR8F5Pk9YB+W5e9dX/nrxJOVPDnttSB28zPN0AVUofgUX IJcapcozxh43r3LtCPki4twRVEvUnEE4oqh9lcMpIZbOWsjWZqud12PGfc77l1M5xTtD hEFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627164; x=1737231964; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1vMWGZGJB0wSpyvnBU07N6sSx7cJJIas5pZC5dMSmqM=; b=LyZy2woS1DIkdOnI1X+CUPw921XawFGVX1XUTBROHlvE5Cswsz2WoDtD69Wndt+Lbd +qjsr50m3/w7TWQ9fpPMaJ7miiXFH8IQ7plR7G2cYKLTzC8DwgVeYtxb2jq53x4oMg/V tFPGf3tgZVBAMlvDEnvcm4NzTJVXibKxSCtbeBdErRMyVRE6i0TYrTqR5nAhpA78078e hho4RAPdOSepIUGTOOF0FDXfJCp8CwLAHFO89ccy+Fvo3VzllcfOLYS+iZBT6ArjNAZ6 4KiBhHytKUHB2Vn8fx60yRndhKy1cO2ZMRs5JBoWPTQYY2uMoSp7BqrfLCN20I6IKbwF GuwQ== X-Gm-Message-State: AOJu0YzGR1eHBgJQHl0b/GqxwS15zyrHOOzVIZWxVrCE/rOB+2oTvvLX bxju33lWONMMoeaPLoHlvYBuFAfbV89tJXFbVH7wHAzsdHPFACpT X-Gm-Gg: ASbGncvS2UHwJ42aQUoinETXKzocB2YVAbAXJWfABE+2ZSnfy/8vm7jGOXBeSOYhRlu HHaRywIqOra/SQ3c0eMXGvDejYnmIyHPsG4SrxnSOl4P1zgyKhO4hhE2R3k2sSiicDIU7/hpNA7 PvhnXgUCLS1iUvDbcogr6qPqhYCf7MJ6Dq9uCjvS2/7OuK/xhg/hDLwr5v8Bs1SfGCg65UgQbbm e2K3q2FizzaA/+RaR/D9oqe0mN5qO03kaUqc8fgOG965RBEL2dxsMazf9TizGHTJPnSVjemMuri Kda9ZMgQZgaknkckC2uBvMgb7uOm3uNMP74VXm7QZtLYOeUZ++BRt+PCISgnF3K+lYTARWEksIc 7x2XjIM6ye5TWSW2KnOd5gLz31uh60YohQevjUkmEnkMeIp4w X-Google-Smtp-Source: AGHT+IHoE30CMa9ywQxt1egmEpmkWDIpaNCYZdnjnLpF8PElMAAkdvoGsiVIa0FgwAVPYDJr8euETQ== X-Received: by 2002:a05:6402:3585:b0:5d1:2631:b877 with SMTP id 4fb4d7f45d1cf-5d972e08387mr12847338a12.9.1736627163431; Sat, 11 Jan 2025 12:26:03 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903c309asm3116271a12.42.2025.01.11.12.26.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:26:02 -0800 (PST) Message-ID: <1667a530-1bba-4f5c-8484-1d4f60749111@gmail.com> Date: Sat, 11 Jan 2025 21:26:01 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 02/10] net: phy: rename phy_set_eee_broken to phy_disable_eee_mode From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetw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Pv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org Consider that an EEE mode may not be broken but simply not supported by the MAC, and rename function phy_set_eee_broken(). Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/realtek/r8169_main.c | 6 +++--- include/linux/phy.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 5724f650f..bf368b32c 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -5222,9 +5222,9 @@ static int r8169_mdio_register(struct rtl8169_private *tp) /* mimic behavior of r8125/r8126 vendor drivers */ if (tp->mac_version == RTL_GIGA_MAC_VER_61) - phy_set_eee_broken(tp->phydev, - ETHTOOL_LINK_MODE_2500baseT_Full_BIT); - phy_set_eee_broken(tp->phydev, ETHTOOL_LINK_MODE_5000baseT_Full_BIT); + phy_disable_eee_mode(tp->phydev, + ETHTOOL_LINK_MODE_2500baseT_Full_BIT); + phy_disable_eee_mode(tp->phydev, ETHTOOL_LINK_MODE_5000baseT_Full_BIT); /* PHY will be woken up in rtl_open() */ phy_suspend(tp->phydev); diff --git a/include/linux/phy.h b/include/linux/phy.h index c5dc2dbf0..7138bb074 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1318,11 +1318,11 @@ void of_set_phy_timing_role(struct phy_device *phydev); int phy_speed_down_core(struct phy_device *phydev); /** - * phy_set_eee_broken - Mark an EEE mode as broken so that it isn't advertised. + * phy_disable_eee_mode - Don't advertise an EEE mode. * @phydev: The phy_device struct - * @link_mode: The broken EEE mode + * @link_mode: The EEE mode to be disabled */ -static inline void phy_set_eee_broken(struct phy_device *phydev, u32 link_mode) +static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode) { linkmode_set_bit(link_mode, phydev->eee_disabled_modes); } From patchwork Sat Jan 11 20:27:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936178 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A32D1799F for ; Sat, 11 Jan 2025 20:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627234; cv=none; b=inTQZP53YZN1nnDYrTLeglOLpp/xenB4fKstUiHY3YyHGJCPI6IFKPlL/dNE8nZg+wh74qnR2Wbs7GeCxdy8rA98FLiK1EfNbqLezVyxjRCbJ3Z2J5yz9XlNqE9Ds2vaJYxkw5K52fGxzLAAuyOB1dNHR9moYiWQ2OdMo+lOf38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627234; c=relaxed/simple; bh=YCB34JLlQkpPUu3q4HB+ePRyc7u3+yMm46le00milnw=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=ExAJvFqeZeOmuxqyQ4eUZ3BG3LyPkLkTQZ7uxgC3r9jce+QFGEm7eHhGgkPtCVS7QgFzsQf81KSKOl+Mjs2HRvATVR2knnXZ3dCiC7LQyXFaadGLmzTHhZbCvT21k5MmZng7BfHJr3An7dwtOkIoYhM1+PAUA6uEOYoAKBjpVY4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lMP5sevT; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lMP5sevT" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5d3bbb0f09dso5426453a12.2 for ; Sat, 11 Jan 2025 12:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627232; x=1737232032; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=B/FpL7CmJTe1W7DtWMGgO7HVASN54rPsnRzFSSP0ZVU=; b=lMP5sevT2yHGmUkhuI/peAMALvt/YXYsOK89PWhtWq4Ur8y15fpXvSkPNwiSQyPgiU o53sODdGyA8N0xHgaZvU+5YFcWC6tLRp94WONvp2GyscwSq15/Kyi4F6cgbwel22jKBj 5TkKoP7Bc38xysK1NUr/diDpKJuoJEPt9CUz5fm2Rv8X8ly9WxlOxt2s6taK6zngrRus uzm6eqa24jmK/hMIH6vSrgyYq31GMd4IXvkYgKqb8fdxizXgqhxxDZYL2nXd7TYsF34p li7rdX54MNqrZnOVBUrEoosAZG14GrRM959uI4m21hVFutmff0WXnNZBIhmp8m9N7gRM C2ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627232; x=1737232032; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B/FpL7CmJTe1W7DtWMGgO7HVASN54rPsnRzFSSP0ZVU=; b=YXYmY70GTof4wDCdWxmeDr0vwnz10gRO+nyeZUpBwqCOnsRai78CFHo3ckwGfYEHVr HPnzN+/gcgVkwrlBysG0xTIy6oyX4ybvzxdJSRQHWBIswHxnuuUO5Y7bzPYFGnFOaXFt mHc9t+5rE+rJQXPS6SYiezEOE80qiHXaZSso3vVXNHLCwxZjS5hcv/3sj5Xo3b0WexRZ x+0Sr7Ybejfr4M7R9e7WjKDUkWPKq58VheiDqnDvEaVb3fq6XZ3uwnxyDV78cg37lgfT 4++BBw5oXf89rU5VGisM0sDqYUto8nCeoop5G5NP8/cgsXcDAlYvzea2OuPRVolfWn4v coUg== X-Gm-Message-State: AOJu0YxDLSIiV9MyUQClVHwdGzCv1IJXT64UZ/f0o4VmgZg0EJGt6jgw d5lKg8FUHH2Ms1/RkmGDXfzbB5hZQoa4Zar1LVAp83vDfEJRMW1p X-Gm-Gg: ASbGncuU+Yx64h7s1JMonUXzpHTbvGRURraDAgONZGZt2PP+TnxkJmbbNMUFzzU1K9k m5KsmtnYzmLdSli6yBH6WbOXyXAtNMU/8sPjvodAMGvH90oY+FDCAUW3eXHC094qd7t3cp/Olhz hI8RB1L+5U0oNWJliCMyAkIr35x58KrKOthDVLQsupgg+69+N4DMh+xnMW3WQwQVDJAx11rGCrv Fa1tdRlNm32roEGMTgKohR5WP4lmzqXYFEQcqlcjEShN6chfeWd3Cqumi1u42+dkJpVPdQzhedQ 7lSNeN0Z5/vEuKc//zBUUannoYHpapJHp26OlR+YpGphBQICZkI/ue8jvthsvGFNsVcfj9MAvMZ i/quvqBVUb1AF1o6k0p2M9kFgj4B2qAdAhqaXFICEtINHxy1x X-Google-Smtp-Source: AGHT+IFMCppDnxvYMIoryUEJwH7yI6ZAEc+ZW0a0PiXEyYkQiVGBmXhvT9juxhnCSqmC9epiwFXbvg== X-Received: by 2002:a05:6402:2105:b0:5d0:bf27:ef8a with SMTP id 4fb4d7f45d1cf-5d972e4eeb6mr13536823a12.26.1736627230003; Sat, 11 Jan 2025 12:27:10 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d9903bb465sm3025828a12.36.2025.01.11.12.27.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:27:08 -0800 (PST) Message-ID: <8143533e-8eaa-409f-b5cd-f653fb32ac43@gmail.com> Date: Sat, 11 Jan 2025 21:27:07 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 03/10] ethtool: allow ethtool op set_eee to set an NL extack message From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mO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jnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ AzOMdW09JVqejQARAQABwsF2BBgBCAAgFiEEbF+pj/I7JePKMl6Fct6KD1TwOgwFAl/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org Disabled EEE modes (e.g. because not supported by the MAC) are silently filtered out by phylib's set_eee implementation. For being able to present a hint to the user, expose extack as part of struct ethtool_keee. Signed-off-by: Heiner Kallweit --- include/linux/ethtool.h | 1 + net/ethtool/eee.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index f711bfd75..8ee047747 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -270,6 +270,7 @@ struct ethtool_keee { __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); __ETHTOOL_DECLARE_LINK_MODE_MASK(advertised); __ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertised); + struct netlink_ext_ack *extack; u32 tx_lpi_timer; bool tx_lpi_enabled; bool eee_active; diff --git a/net/ethtool/eee.c b/net/ethtool/eee.c index bf398973e..6546d7290 100644 --- a/net/ethtool/eee.c +++ b/net/ethtool/eee.c @@ -129,7 +129,7 @@ ethnl_set_eee(struct ethnl_req_info *req_info, struct genl_info *info) { struct net_device *dev = req_info->dev; struct nlattr **tb = info->attrs; - struct ethtool_keee eee = {}; + struct ethtool_keee eee = { .extack = info->extack }; bool mod = false; int ret; From patchwork Sat Jan 11 20:28:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936179 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 984961799F for ; Sat, 11 Jan 2025 20:28:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627318; cv=none; b=DvUHBPMkjcAU+SWkRSQlEqhLgNn7LyK6vLP5d42VW3DiuEWotWXALmtiL5jLibrldPpLisHGK+Y1c2sZ7H46F1erfURsIChadedei9LLX6M4TTlTJvSCPjL2Sm/49BANsM7dCAo7msomCsCe2AbJeeb5Mb/JbKqNTC86LIS6nsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627318; c=relaxed/simple; bh=1XlbVDi+vnVa5o8t6P7uBcBXhUBSSEMmPD5wYfBEAmQ=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=jC5TcmibfRHNeKlG5MuYAKeG7uiC2RpUPTDl0f9YA2anyros5KdK/1GEt8CCGHSxQl0kCYklvc2eLAupF6/DmbGD4mALwrcGwwi62blptR/5CRtdwBfU5AHkOiuhokeNu43ZzI9N1AtVujDPW0+iN3DA3uh3kApglQg24VeIIr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZAwH8nVn; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZAwH8nVn" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-aaec111762bso573042466b.2 for ; Sat, 11 Jan 2025 12:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627315; x=1737232115; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Tp+I878Sd1xyWvAiGbomw4orw61Xs7egccmDYSvMAI0=; b=ZAwH8nVnYvIHobP61rlTHOYN2LQ664MmxcW5s8Udk5Ox19DCAy0pkVA1F7hS5mlIQA WNzyhmZBWi2QGvVijocn1WPn4N1r51yfMMA+FbbBRNZuQrzWEEO9FeYtExWHDRDpIr9x tZ0GkCDbLi7wqP/pySrVLLiRdz83OGgccd596j5HMTKBT87l+QJx4Tx7I79d+dSLdjK2 +sUMcKauT3GzG72Di59FZBD7fz2mNZdhHHTdn/17pxx9zmQS7UDLcSEpkmW61WeBIIGV 0hDTqN0nUfgkydHegnDpfKZzzilpKzoAiXoaQFpPLI5p59A0aaW6GLawBK+KP/qacTaQ HCkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627315; x=1737232115; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tp+I878Sd1xyWvAiGbomw4orw61Xs7egccmDYSvMAI0=; b=djtjQzTYxI2zv+TWJKr/vsd8MIhh7MWKN9eRHs88gi1zsrNSUJA5N2K71zdNRWO5jD u9C8s4Ei55kQ60z781BILvp0sXyYgf+Pi0PFpbO1xgDYdYyBVbi9QeR/5hqm+Azx4S1N FpG0lK0mfotZRkDtKiMhEzMQvXUagS6POAkueF62UL+56FjnP2SudeZX3z6UOJLRzkjH mOIYnemPvi+iVtZ39Y0CDCSg8YzPqW8sqReivMFSyhU235LUeJMRTr2NuIPK42FP9oyj WJBttce5O9+eoSY02KiAj2lMhWAAPqX7WczxXWnHZEsI0hWCBKBIoEcBYuG9CTiiyTQU 5B2g== X-Gm-Message-State: AOJu0YyTzUTYwjncZsVMFM9ouO3bw7yMWlhKFjnTshQRqQn3QrdXQNOo A19pXjgoUX+Zwt5DWaLipinr6NJey3Ste7TCO0rVKHy+Rg6LwOzI X-Gm-Gg: ASbGncvzwR9oavL45Y1vsvNF6C3fICTHS17Mlsp+G2VzS+SeZaR5ZAU5vkqWoL+ID9Q UGWcVna3PeCUAvQvAAp5PvKj0YS6qJz13DidpMPVX6iJv1m3dalMXEX3PKkLHukPHOMxQ4gH3M8 FmZ6NHg+HFt4PrLuvJyLxzbwSvdyVXzx5uJtw3QPMjdGyDpm/ziWtqC5rCPMuh1RPzevtO7Hg2M c8/Pccs1GGyuFlYunrkGP+GAE2R2hzHGdJPmOitHPaDAski34vJe/REwN1P3ltZsTu9zPZEvImk Jyu7AJ4ru/khoYzyuwccbA51qYbFlp8tUFiZQNwWGlo2FynCxs7nQQkn3V0qeLNYhPpKhd9cvBj 6ypGmdgtPJ4rkgA+WWUHLVF4ZHAm+jUWnWonfqQSgwQdmxzu1 X-Google-Smtp-Source: AGHT+IHLkoI2UN8Kh6Bl/D8hePenZi6vpmrzGnATmGCb60H9NBAKtoGadN5cksUYRRQPwqz65FbR6A== X-Received: by 2002:a17:906:f58a:b0:aa6:5e35:d72d with SMTP id a640c23a62f3a-ab2ab703f0dmr1377598466b.24.1736627314639; Sat, 11 Jan 2025 12:28:34 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c90d4f92sm307876366b.57.2025.01.11.12.28.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:28:33 -0800 (PST) Message-ID: Date: Sat, 11 Jan 2025 21:28:32 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 04/10] net: phy: c45: improve handling of disabled EEE modes in ethtool functions From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0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OsJEi8OK2d2j4FfF++ AzOMdW09JVqejQARAQABwsF2BBgBCAAgFiEEbF+pj/I7JePKMl6Fct6KD1TwOgwFAl/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org Currently disabled EEE modes are shown as supported in ethtool. Change this by filtering them out when populating data->supported in genphy_c45_ethtool_get_eee. Disabled EEE modes are filtered out by genphy_c45_write_eee_adv. This is planned to be removed, therefore ensure in genphy_c45_ethtool_set_eee that disabled EEE modes are silently removed from the user spaces provided EEE advertisement. Add a hint to the user so that it is done not that silently any longer. Signed-off-by: Heiner Kallweit --- v2: - silently filter out disabled EEE modes - add extack user hint if requested EEE advertisement includes disabled modes --- drivers/net/phy/phy-c45.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 468d24611..d5b5531cd 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1525,8 +1525,8 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev, return ret; data->eee_active = phydev->eee_active; - linkmode_copy(data->supported, phydev->supported_eee); - + linkmode_andnot(data->supported, phydev->supported_eee, + phydev->eee_disabled_modes); return 0; } EXPORT_SYMBOL(genphy_c45_ethtool_get_eee); @@ -1559,7 +1559,12 @@ int genphy_c45_ethtool_set_eee(struct phy_device *phydev, phydev_warn(phydev, "At least some EEE link modes are not supported.\n"); return -EINVAL; } - linkmode_copy(phydev->advertising_eee, adv); + + linkmode_andnot(phydev->advertising_eee, adv, + phydev->eee_disabled_modes); + if (!linkmode_equal(phydev->advertising_eee, adv)) + NL_SET_ERR_MSG(data->extack, + "Requested EEE advertisement includes disabled modes\n"); } else if (linkmode_empty(phydev->advertising_eee)) { phy_advertise_eee_all(phydev); } From patchwork Sat Jan 11 20:29:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936180 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE2241B85D3 for ; Sat, 11 Jan 2025 20:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627370; cv=none; b=QGA1pn0KEej52iJ9G9/eH2KPnYY9o1pUlNrVUnfSz/GbanzmaPFEy55N0czWYJwLM3t3lrrh2m+ahMMRBUf9XjbChLyPBdMB6Q/n9C7vlEw1YMDcdH4WVYyDn1MRNSqX1lNmb8NgjMVGhH2A746Jy8wl/jr0DKxPw4CPKKIPOlo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627370; c=relaxed/simple; bh=jPx1NDxNEud4owSbvYgV5w/KsZRT+U7tOEdh19pm1Z4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=gKdom01gAg4+83r8OrsMvI3xIw+9InxkuG6MxbS/Mmq1veF7Rb2p6BGL+bTInC38Z5nQiJEXsuG5EYGiy+Q95WjtXJIX0RP6ZaX4biLZAcrR96IEldGOhM9I3X5aGKWlY0vmN5C6evnEv+2ckbBoXZPrdbTuK9IJlgwCJy1cPIA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hxpH5r1y; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hxpH5r1y" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5d7e527becaso4978174a12.3 for ; Sat, 11 Jan 2025 12:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627366; x=1737232166; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=D1GoVZaTZhrjTjAe0U0XKWytSXKvgBIDeabv1Mucsks=; b=hxpH5r1y0S3ZHbyYXqwueXQF1+nFo7UZUkP5M6Ii7lJBlsWtPAvjgQYW0NnlM1iISv Y7Yzj+i6+KU4IHaj2jPfjoUGnBArp80p1yKxjXxvsEQKW1Dd4MwYnFguT6Xh2/NK6iWG EiwRlkWkayLsY7mieXsoa4SU8q8l6r1Jp6j5mjEfIBQOLyp3uSE09V5i0jcCshKN3b7X SiwOR20v6onpPFOabo1TDGUWcAIoEM6r1OmjqjJMZREJLWWEj8GoSw7H8D2bM+j0EW9G Ci1u8lrOSPIrdvr/qwbvudh/vpGgFKTe+WwtI0vL74yamja9oJz80G6t37l8ZBn6GlMZ zOWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627366; x=1737232166; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D1GoVZaTZhrjTjAe0U0XKWytSXKvgBIDeabv1Mucsks=; b=EuzRkxyBZZVHGri2W1defCzzOCDgSm6cBhtC/PJNZoI0jadnMvzrb1bNI2qvxhqQRB UrLzY7M7/x4Ntc06bycUX0wI5yNq9uxSorR7xBMBFzBAFZe7y2zQDdcaqtjBekGU4kQ/ 5Ph/eaU6oGAzejJMEfQDE2CXDfq4ylE12ZCvZWBzgvxermtmMLIl632/5exj6hkzG/6h G36UuT1roi+Vp4JE0LkzRf6tgxEjov4TWsiAgQbqSqOqK5bHPxqq0v71nU5RaIvImGzv vjegm1jp8620LP3GsmtHdFw414zHkhUGWP4O9Vm4SjlW3ROl63KDGgjmfEs249grmpdC MaAQ== X-Gm-Message-State: AOJu0YzyjrgdWUgDdm1cWKb4eg6XMA7ZmGhNDey4vk277762hlbOtGFY vQPxH5jMh4xkF7UdGxfriXzowV6trcds9QhTe6VAuYCWI39kVyQZ X-Gm-Gg: ASbGncuxHtf6OJIzxJh6BrPPJlCQ0Ohuf18ZovIBdQIjhTs4NjBCkK7O6X6YgJVUYak xXw6B/ckgklftRIR73lpZJKvFR2kMCAdCBMWaMnnygNU60ek/+BT6cukUcpYuspCuWj87QIIVk0 PUL7YgRm5To2mm0ISKvu/9D9HI1xX2A5K3ZH1egYua20oSiEou9LSHMa9++gc45ghsHp6yd36xo 7QirkYIjKG6v9qEQNQFErDELg4Ih+glAyHNPzi89Fnq3/anApPD07Bv+TEiNk7nm0VbVYE9C1dD NS/2BUnhe7ODRBrLrirAH+3zDtw0XsNeJ92HJAoMh+uFuw9toAtlCMib9AXZB+nREvU38z+MPUS I5EIwC7VCkuhugAZLifNMYatQszxqVwrNNclPbszhFwDU4jQb X-Google-Smtp-Source: AGHT+IEt3z+b1QX9fWF+F6Nm7xHhLGepK+45KYaYO655Zhfo750cCv3cYC/torAHv1GDVn1p1K9DIg== X-Received: by 2002:a05:6402:5109:b0:5d0:cfad:f71 with SMTP id 4fb4d7f45d1cf-5d972e7110amr32758282a12.32.1736627366085; Sat, 11 Jan 2025 12:29:26 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c9649c5asm300385966b.183.2025.01.11.12.29.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:29:25 -0800 (PST) Message-ID: <4f59387a-a164-486d-a8a6-2ec88c7482b0@gmail.com> Date: Sat, 11 Jan 2025 21:29:24 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 05/10] net: phy: move definition of phy_is_started before phy_disable_eee_mode From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8DoMSycQ AJbfg8HZEK0ljV4M8nvdaiNixWAufrcZ+SD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.com> X-Patchwork-Delegate: kuba@kernel.org In preparation of a follow-up patch, move phy_is_started() to before phy_disable_eee_mode(). Signed-off-by: Heiner Kallweit --- include/linux/phy.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index 7138bb074..ad71d3a3b 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1318,22 +1318,22 @@ void of_set_phy_timing_role(struct phy_device *phydev); int phy_speed_down_core(struct phy_device *phydev); /** - * phy_disable_eee_mode - Don't advertise an EEE mode. + * phy_is_started - Convenience function to check whether PHY is started * @phydev: The phy_device struct - * @link_mode: The EEE mode to be disabled */ -static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode) +static inline bool phy_is_started(struct phy_device *phydev) { - linkmode_set_bit(link_mode, phydev->eee_disabled_modes); + return phydev->state >= PHY_UP; } /** - * phy_is_started - Convenience function to check whether PHY is started + * phy_disable_eee_mode - Don't advertise an EEE mode. * @phydev: The phy_device struct + * @link_mode: The EEE mode to be disabled */ -static inline bool phy_is_started(struct phy_device *phydev) +static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode) { - return phydev->state >= PHY_UP; + linkmode_set_bit(link_mode, phydev->eee_disabled_modes); } void phy_resolve_aneg_pause(struct phy_device *phydev); From patchwork Sat Jan 11 20:30:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936181 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A1AE1B87DA for ; Sat, 11 Jan 2025 20:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627410; cv=none; b=ehhG/Kr8v1f+8eSuFdfEgWBKeQUvEhfVmtBRB9w6nqXA5iXo1Zj9+sES9s/dshb3YMVwE9LVMWr2L6uJxprVH+kDULj8cHDM655MsS3q2DjGR5VMW/259S1q/11RBiUKNUdPBS8BvqG3S/SpHCP4AvOeSV/QfyUX+lPDgQJMvhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627410; c=relaxed/simple; bh=dMnqu2NFxklOsSsinY1qryXx9RuGGQCtBaDejSngLQE=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=rorGQj98pQbfRXA4GBIPGAnmYnpVh8FIxWaads4kvdSHIFxw4aPNelFKFYKmGGCxEu0oXQfAmN5nNUDFQ4iFcwYOFF+fKPLLBWySSVIJFmtXa9jr3SUY0obaEXpRxSYtTjHgkt8LHJZwOSfQFiN8w0BEM3ZJN4zxxBlG95tSbCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T+1kR3Pp; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T+1kR3Pp" Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-aafc9d75f8bso601957866b.2 for ; Sat, 11 Jan 2025 12:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627406; x=1737232206; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=wBMddhpX1NI1gq7cSA9OWBGZGHoa2QsJ/OhZHRlrOog=; b=T+1kR3Pp0fEKCEwTR3sLTdElgluKa+ofzEYtXN8OlWDDnirGGPtZi2YEQXf/yKnx9G k16gXFX4r03Wvc5qY4ZBopiTVrYmloO9YTTCEQLM5XMJuvBmKy2PuOH73CK9iEu9bUQO V1k+qyoF/9DwpVtGyttHrxhn+bz9q1MErOjurgxfi4YfKUXvXeP2YMBtTb7jiPHg99ns HGkRhJaJ1hsWsTInwvwxgou0c8R0LyXOLyVOMx27vam1DGDA/p9RKNuFuzcsyBTaRlPr BbC0VxFGP1tgCnJzzZX8vliRJa2h7y+px/VbvmTh87tedk0oExgGsNupS7jn4yJS7ahE JMfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627406; x=1737232206; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wBMddhpX1NI1gq7cSA9OWBGZGHoa2QsJ/OhZHRlrOog=; b=lLcLCTTI7SFBqjE9+FgpdDIzqsY2qkTIOMnIkEJBpV0wxPyLqyBZg0Rw1hMDTse58z w7lFu4ZxVTYQjO4zEKgYRKriB5dyVsNxlMpmqRCgGqNjTyFkkdgPK1hg5MZwC5BfEtXd 8Fni1FpQL4elceaT6Rh0iobMZukoCjjfyBI1VzLfaCFaVq8ExBWN1HnT41or597v8Zza QOEfifD4qJtGnTxVpj6N8T0NTWsxmRhsqIizhkYhZN/1NBMbb2812kscAbw5M9xKBhrl +sLzOASgNvC8QcOxwUv0wrLv1Ms58H/UZCV3zAJxUnUUbu3hpiAYa+pIjrjy3EKTMgtI t1+g== X-Gm-Message-State: AOJu0Ywp3NfyA5InTUHE4WGOqsKm4jG4vbgpt34bFiIcEfwheIRs1Ru9 Pa12d45IUQeD4HXaHHy35VMgTF5eFCcdXjKXQr4F/WDoZKeuWWxw X-Gm-Gg: ASbGncu56mX7ZOdYGcQRWTpxAgIUOrL9YF5mZKMBgJ4DCfDs9C1pvIp8cbNudvNyLvp yBqD2SnJnnWbHDR4qeoctVzM4nRBHS51EiUuzByTdwA8jlk8aFg51bTAuDanlQcgD7NmILMbBtM kJhpxOwsltqKRk+EzZ2TUkbfAu0455IoO5MWpX5Rkl6xmO0evUzcygUt0wKsRdLDCW4TtdWSSNt Fk7A3twX3okiW0RNy/DmTfm3cWiNfyoE+GvvAJfq3GcVMCro3IrE/8IM9MCYUu5iQlwqyMIAPAR d2DypBnuf5bJnLRTTDIkhq6Cv8r1xHiAhNBOi+vnhJkbH5tZ4bSn3O+1gAkBvS1II+KO4BfvkZv okWoBlW4eYN6xej/znYoxK/QcJ+iDmiGbLj5U81hvEQ1sYCyA X-Google-Smtp-Source: AGHT+IEZqqQU9MT4rQ4dYKMR92uyCfhR5COMcPVT7CRFzt15rsM3bzJ+R8d9suGWjpzPusaLrnFRNw== X-Received: by 2002:a17:907:720e:b0:aa6:6c08:dc79 with SMTP id a640c23a62f3a-ab2ab741567mr1363572866b.35.1736627405740; Sat, 11 Jan 2025 12:30:05 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c9562ea8sm305981966b.93.2025.01.11.12.30.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:30:04 -0800 (PST) Message-ID: Date: Sat, 11 Jan 2025 21:30:03 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 06/10] net: phy: improve phy_disable_eee_mode From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8D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In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org If a mode is to be disabled, remove it from advertising_eee. Disabling EEE modes shall be done before calling phy_start(), warn if that's not the case. Signed-off-by: Heiner Kallweit --- include/linux/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/phy.h b/include/linux/phy.h index ad71d3a3b..fce29aaa9 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1333,7 +1333,10 @@ static inline bool phy_is_started(struct phy_device *phydev) */ static inline void phy_disable_eee_mode(struct phy_device *phydev, u32 link_mode) { + WARN_ON(phy_is_started(phydev)); + linkmode_set_bit(link_mode, phydev->eee_disabled_modes); + linkmode_clear_bit(link_mode, phydev->advertising_eee); } void phy_resolve_aneg_pause(struct phy_device *phydev); From patchwork Sat Jan 11 20:30:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936182 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D012D24B225 for ; Sat, 11 Jan 2025 20:30:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627447; cv=none; b=KoPWRB6q/n82Gdb6POaADvfuD8cubcUczaxRc+2CmeD4sb5ytZnyIF++dzKXg5bQcJoW5IrNpDReFN1G7g350OnRQ6xk3ST17AlRuia4cycrblizZBPKG5G/6dNhyNk2Mrd/3p3nGmUvC/cZ3MqYOJoUncS1sLLpRn4K4boWK/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627447; c=relaxed/simple; bh=E3x2OQoXJqKkDTmlqFVNtpZpLpsrweRHWHwI3zrKpyA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=VZplAqNHMvvxiAKtNTXw/YYadHYDVnRQTLcW15qIYx/4hg9ZU7IQ7Jjsb3P4eiDUTZhJsHwSXWdHV6fOy24C3oe5h4if0oMBOx2tcNCS2e5OuKVr0a+8GKsR+Jy7fw+jBc6LLiKA7SSuYx3CSMuCVmKQ3JeYrS/Rmj9Qv+HKJ64= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=N+UMAM35; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N+UMAM35" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ab2c9b8aecaso405239666b.0 for ; Sat, 11 Jan 2025 12:30:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627444; x=1737232244; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=TeDwEnVCu9enUYBZi4CcsChMzu7xhWaZb2+Ok1gyBZ4=; b=N+UMAM35fNzApYKsJ6XLUjwoJmeRXSyStTNKC4XZiaxsXg4AKT5+lWmZD6dFoReUS4 OTw17pnCH15tU8WBZLnKSxemt5Nb2KkaBNic16EjX+Bkw5tAylejrIQlppLl83YwR20G dlGEFTl6gwRgyIJ6ikfA9yFNqbiB+a7giL5C1PdiGYbtbPf+VLCU/2IzKuyaHMWGEeM5 /bRUr90KI1/WEziblU0u6ujPx/XvFcSKMUOBXum1fsCLNUDAnYppawsFFCyZU8IZOhvP VGGABlWlKgYHSx36vzvwWYCeruWRpiioGsRzr+AG0Fv0W+01bU4a6xpW51e4pPbW4diM wMuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627444; x=1737232244; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TeDwEnVCu9enUYBZi4CcsChMzu7xhWaZb2+Ok1gyBZ4=; b=BhvZGC7HT7r2COHex/u3SQwUVGoRMGgv44uIxA6qtUHGYPy3ZdjZdhBDFvlt+ZSqf8 DaaeJJXyjV5CLlrP7K0T1pc0h0yT9hR83YNO4ZH42GnWlVxNeBV9cHWRFZg7D5dKyeuN g7cSPzwOKF0tExnnQr05jiKYJNRMmE+1SWU+sqCKzQyYct9NvHd+CCM/XE5ovUdhcn0X 0+XntHs74MRPs/KCZ7l61X7twnp2BKizvn5d/sTopuLhfOAfWX+Iel1+0sTXJmmmNIB9 81wDaCCEgR/XlFgveLDF1fC/f6aQbuvqDDCyhO1R0pBIeHji9nnkCmzjnKC7OmHRXOep FDwA== X-Gm-Message-State: AOJu0YyqeQEVITTujkXBh0N4FdrjSJw72oIUzvvnGCsUatYgjxNEMgWC kNIRsRCTsJ/pfLnBwrk87/DU7rG488Ho/bkyI59lgmOdh5bufvpG X-Gm-Gg: ASbGncuMy5XX0ocNAhRMgH6wb4hmasCVLuovhTSKrEBkPDwDBEqxexO2IgmPEtiLrRE g4rTIU5wbkvyzKv8zZhN/1khENnHmOgbSFaOxw/8s7se1jZtNI6Ep/owBOcfMRmWuvbFP3BhpUo /KJWwlTKgH/k2mmKJCbdbQRj124FPQKCZYAev5jfSU734XCh2kYF8KZ+wv9+G3lFAiJqsFwTUqK 7Rh4UadTccD0kK8B3+Od8C6yMMgXb2T5Rpm/Wl3CDhSnIE7zTrjrkR3hRfF+9mUrp8cocVhRd4L KwfK5dGqkZSH5I7ExqW7WBbQL6BL5yEri7zWuViP8DSECAjjaagPRIWZtmDkAiuxBS7JwW3oz4a 9es6wtEgcHw9eDow0RhOlB1ALZJvtfY/BYyL2aI+ab6w1meIX X-Google-Smtp-Source: AGHT+IGyPTQFWkhyZFGaBrS35OUQhleg8ZalhjBubdV5BHhXYY9sxEfRe79KkcwoYzjYzAtcQ8aYzg== X-Received: by 2002:a17:906:6a15:b0:aa6:a8da:7ba3 with SMTP id a640c23a62f3a-ab2ab5f533emr1643759666b.27.1736627444000; Sat, 11 Jan 2025 12:30:44 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c90dace5sm308591066b.60.2025.01.11.12.30.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:30:42 -0800 (PST) Message-ID: <80c86da0-80c8-4d1b-91d7-3d31e3c38bb2@gmail.com> Date: Sat, 11 Jan 2025 21:30:41 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 07/10] net: phy: remove disabled EEE modes from advertising in phy_probe From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUB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dYTW gJezWTVKF7pmTdXszXGxlc9kTrVUz04PqPjnYbv5UWuDd2eyzGjrrFOsJEi8OK2d2j4FfF++ AzOMdW09JVqejQARAQABwsF2BBgBCAAgFiEEbF+pj/I7JePKMl6Fct6KD1TwOgwFAl/0ZFUC GwwACgkQct6KD1TwOgxUfg//eAoYc0Vm4NrxymfcY30UjHVD0LgSvU8kUmXxil3qhFPS7KA+ y7tgcKLHOkZkXMX5MLFcS9+SmrAjSBBV8omKoHNo+kfFx/dUAtz0lot8wNGmWb+NcHeKM1eb nwUMOEa1uDdfZeKef/U/2uHBceY7Gc6zPZPWgXghEyQMTH2UhLgeam8yglyO+A6RXCh+s6ak Wje7Vo1wGK4eYxp6pwMPJXLMsI0ii/2k3YPEJPv+yJf90MbYyQSbkTwZhrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org A PHY driver may populate eee_disabled_modes in its probe or get_features callback, therefore filter the EEE advertisement read from the PHY. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy_device.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f6a5f986f..ff4b4d42b 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3613,22 +3613,21 @@ static int phy_probe(struct device *dev) if (err) goto out; - /* There is no "enabled" flag. If PHY is advertising, assume it is - * kind of enabled. - */ - phydev->eee_cfg.eee_enabled = !linkmode_empty(phydev->advertising_eee); + /* Get the EEE modes we want to prohibit. */ + of_set_phy_eee_broken(phydev); /* Some PHYs may advertise, by default, not support EEE modes. So, - * we need to clean them. + * we need to clean them. In addition remove all disabled EEE modes. */ - if (phydev->eee_cfg.eee_enabled) - linkmode_and(phydev->advertising_eee, phydev->supported_eee, - phydev->advertising_eee); + linkmode_and(phydev->advertising_eee, phydev->supported_eee, + phydev->advertising_eee); + linkmode_andnot(phydev->advertising_eee, phydev->advertising_eee, + phydev->eee_disabled_modes); - /* Get the EEE modes we want to prohibit. We will ask - * the PHY stop advertising these mode later on + /* There is no "enabled" flag. If PHY is advertising, assume it is + * kind of enabled. */ - of_set_phy_eee_broken(phydev); + phydev->eee_cfg.eee_enabled = !linkmode_empty(phydev->advertising_eee); /* Get master/slave strap overrides */ of_set_phy_timing_role(phydev); From patchwork Sat Jan 11 20:31:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936183 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 189E11B4121 for ; Sat, 11 Jan 2025 20:31:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627493; cv=none; b=hjmpsRV9p0Z8AlYwd9Ehk4r9/n1Ir7Y2dmSRpYykz4AMUiN88XY+5euKVgV37wp+AhfUnXpVW+Phc+8h4IYg9rhTqx7BdhbuWmsPp0WQQA0glruLHYdoZ0gzc4ttqoJ50U6wNsf9tci8T7jDUv07gooWs4G7BWkKBgOwpvTyy/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627493; c=relaxed/simple; bh=fQOgN1c0jAC5vwrHN2pMGUIXQWYom5HlF5wXYnd+hY4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Xd7uWBHzliBq02aVrW604RaZwJSrfFqxIvysehJg0j+LjpZonL7bBbW1CVsH3ywZSFftCLjPK0Z6s7kfghUUpmoxQv8KpCXMj7og66jM8ccb4FXpuSQc8cV8nFcX/RdLeSOP6wiCoyOy6JvS1PWdfhJ/AQnStg6GTAkadkN12qQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BrZWQHOC; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BrZWQHOC" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-aaf6b1a5f2bso782353966b.1 for ; Sat, 11 Jan 2025 12:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627490; x=1737232290; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=yhP2gDXYSklppqnzyOrY+nD+5UuRorJStgXzS44Z7wg=; b=BrZWQHOCQUnqs2FX8Y7B0y1nbkgTVev5lFvYCT8TDFEdGBGEpPB3OPDxSm4VnX4vic m7RA2tp7NVfNKhNKUPCMSxrxKrrOUasbFYJHKlfofasQwaKl/oEJfEKl4dt0SbC2PxkX jcwFO04rj6AsFdofZZV3jAkU4oHL5/2yhcpd3VThhE5Iq/WpMH4Co5ABXkoFqkXr3hIn ZoYablMIRVPFg50eCVN04BfKzJCJGjzyMlg9MQ/Sr0wmKBG2l7SfF9pz9N4Y3FrJrNaI ZAzR9pVVzBgvuclerJ1HEnO5Os8pQUyH9CR2OnoQMV5bbYrmVYQF4RS0GmrvwqDWwf8k QLfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627490; x=1737232290; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yhP2gDXYSklppqnzyOrY+nD+5UuRorJStgXzS44Z7wg=; b=P39Cm68eDCbfdI1aVkJ1rO/BeWFO/DFpQ5shvT0k1iEflRcaNMkPL7khBzUHi2Jx+L YyCkK71NGytYt9Q/wDVtWiz04wZ3vd+mwDNlv+uE3Un02vkXP+YEX5Wt7Fm5TyFjQNQz RY2UAMR+cOOiEwGPu1Gt+hXuLytidvPxpw6D2VRcYrEM18tZudvY/A0AaLNZH7WIUmRS VDkXRfAkN9KtUyFx9qXm1Hm4Q8tA8dkPZScwgM4RiCqxu6gpwFHIB+q7lJPxcc+QN1B2 2U7ESGB8PNSQGTu360uEIGyz0YK/sOHrPonLh1n1JHdzKOils0hOPgHFYUoOkdqJlhQ/ rnAQ== X-Gm-Message-State: AOJu0YwCrJNeMIxpJnWmbye/VB/3AO++SMaNLaCDgnjWtSEIkasa+I+M cjGOLCWV5ZHxat+PGQmE++f4SXn0E/lE1gxrkIQM6HfLqVWK6DPN X-Gm-Gg: ASbGncvNa+DSaslMXbQYkqPlvT7pYE2ZItOkUGxNnvgcoLCQxcI6vmrwv7aoWlSvGbT 5SBX1lkHWzFBNSxAU/xn8tmkEkfxx6g2iROKZ366Bu6MRXAgPy5bxWjfJpsfcGyv1Xqc2bz3REF I4OsOl1BincYy+a7JhVuAeKkQLRTz0NPCr3Tfc5fC6pVFpTf6PNaOWnGddLTwS4auUWlGpOyK3P o3CXoH0i3pVXoPueHyjvIBiM1CSGfx9Ap//cv4W/d+E7OZc3k/os+DZ4orRxftqHRtSJ9+cVc4g EtOt8W4ib6r83k6ffmPwhfyNV7daDmsqXCOa8XfyoUju63PBSRnf8IZuAbNljIJQDO1pBlhhJdy yROkTLp445LasH8Vxn3a7XjIO9ctxouhNileXkCQpHDQvNeHA X-Google-Smtp-Source: AGHT+IF9p1BJpcEld6mTf9/RAQ8n4SLhaSuARQwDhtoTsI3C5sZHAWvJKbKugZSs8lPlxM57uaIv8A== X-Received: by 2002:a17:907:c24c:b0:ab2:ca86:cb84 with SMTP id a640c23a62f3a-ab2ca86dd4cmr907489866b.13.1736627490300; Sat, 11 Jan 2025 12:31:30 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-ab2c95ae536sm302791666b.139.2025.01.11.12.31.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:31:29 -0800 (PST) Message-ID: Date: Sat, 11 Jan 2025 21:31:28 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 08/10] net: phy: c45: Don't silently remove disabled EEE modes any longer when writing advertisement register From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8DoMSycQ AJbfg8HZEK0ljV4M8nvdaiNixWAufrcZ+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mail.com> X-Patchwork-Delegate: kuba@kernel.org advertising_eee is adjusted now whenever an EEE mode gets disabled. Therefore we can remove the silent removal of disabled EEE modes here. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index d5b5531cd..8cb420c04 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -683,13 +683,10 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_mdix); static int genphy_c45_write_eee_adv(struct phy_device *phydev, unsigned long *adv) { - __ETHTOOL_DECLARE_LINK_MODE_MASK(tmp); int val, changed = 0; - linkmode_andnot(tmp, adv, phydev->eee_disabled_modes); - if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) { - val = linkmode_to_mii_eee_cap1_t(tmp); + val = linkmode_to_mii_eee_cap1_t(adv); /* IEEE 802.3-2018 45.2.7.13 EEE advertisement 1 * (Register 7.60) @@ -707,7 +704,7 @@ static int genphy_c45_write_eee_adv(struct phy_device *phydev, } if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP2_FEATURES)) { - val = linkmode_to_mii_eee_cap2_t(tmp); + val = linkmode_to_mii_eee_cap2_t(adv); /* IEEE 802.3-2022 45.2.7.16 EEE advertisement 2 * (Register 7.62) From patchwork Sat Jan 11 20:32:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936184 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA0991B6CEF for ; Sat, 11 Jan 2025 20:32:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627542; cv=none; b=aSYZIo14Vru6CEf8ANA4iGDWgpdVDmeMgSSyogknERHING7hYGCbtAvN850kRBPQr/Ry9W3Pcwt8Rrrv74CVlisUtjhxqUgRxv4tPP9WNmr6esIMG/2hJ0ENZk+Z+rOuA7Ur779XzTxNSmlOYjDS8Zw7wI6AAXwjsB61uFhxXKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627542; c=relaxed/simple; bh=Ucz0hiAy42WDB4uKuZxwdSoIsDzU9OGM1jY55eH5MIo=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=dI86cQ1CjLxs1Ohc2vszYEVZK2p46IZdzfc5x9f36b/0GPp9WSGLjvnRIgQ5aByMip7DamtmPNthx68WdKKPVluiVHMJuHwYBCA7R2Spot4NRVCkBW4EapMoxvfvwpEiRNec/+dzaBv0P4AyJfznROKeYut1KXAxLUartDALPB4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cqwfwG+B; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cqwfwG+B" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5d982de9547so5934586a12.2 for ; Sat, 11 Jan 2025 12:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627539; x=1737232339; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=tIB9hYm3SMM7nD8Lkz5Og80NbrGxcOWypLxKiDzkZ+s=; b=cqwfwG+BA13vd9Ntk3T+ryY4AxDoS78pIS/nNPgXbsciuMChuShkk9ZCUgCh8g3lZc 3/oCY/A9MAVrierFTbyL54pE3DllvW3astB7UW3qv1jHP7HTzWryh9ng0V/6WeGoFhhf HVrEF+j6T72DtuAVD4mYyaE6UnW4KV3b5aMqrw2WUnc535itFykcRaBeLOe8I2FW2B3P XIn1p1DYUeHc/uVuKyHx6F5oQiWA3Krrcg9YbjqYYpjWTdZaU7fRARRk/KnIV3x9zPo0 9joEB/sFmd5sVyBaHq9e6O2YOlFgqarSY3MuUneuCDmEjFLXJfn3QAU/YHj+afwByK5f u6lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627539; x=1737232339; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tIB9hYm3SMM7nD8Lkz5Og80NbrGxcOWypLxKiDzkZ+s=; b=YsnPPV3jP5BEcFamf0h0Mckf4D6C84SAxr00nfwle/gej7j8kMN2PJ/sdpAVsikgV0 5+7Jm2eGINlm+FM1f6/C/KUSDh1JhmpEFtfrZEmiDUfh6MHFYO7MANwmE2po4C3YFqmv LRFkMeaHBHYcFnmynwcmnxmSP+befwF8KxeZpot9VyLnhnx9e6xkT4gB7ObteMm36JFS AsQ0+57y5EQK9aN0egY/TWO/QzF63+p3bK9V/o463jlk8Gmip01fQYHXK/loptePvC8v bQfnGWWc44nuzzDdWDnHseTbRLWdiy+/pKqIAX03efSarlH4VSeAzQxQFILT6+sqCUr7 GGjA== X-Gm-Message-State: AOJu0YwYw3JHvpnTTcQV2TbqGjwz+FHihygCGl4lImHQHEo3EccL2Igx us6kwZMz5moOlMbW43upVkznZmeBKSKQ3lqt6vDJ9rl0tM5Fl0VV X-Gm-Gg: ASbGncvEiIb3ZQCKX4ijIBHQWYXiPkYF0HFmE8mP7VwhVBcWr3S2nTxA2S4O2axyM26 gj47Ae6Dj8PSCIMInlSxhcN9txueYPsdXUlgbU3cm7rvGyDa4XsA2hr4ZcY8s8ah5iGv10Oi1Y7 Cp1t7eo9oBQjx19c9Orc9p7rzG+ijT5znmhHJ9WFJxEmz2GS3oW4i0KmMvkRwaElr94A//fFCO8 42MzJtj3orYuz44gYOAY3sjk9BeRDpYcy1bPAzLmZLzIdHIT/q8CibQtuNrXu6nrEtueugKZ449 MhYtOTCdv2ptCOtzL+1FTwyxKp63OiENUTyzPL0xhUd4CZfci6uuelsKYDZk2lP3KshiwpORoy5 XX4F4NCPoAVL8v0rDB9xqu5Jfxbzu+LXKT7e5fnF5CVCHDhBC X-Google-Smtp-Source: AGHT+IFCukCFdvQwhQ8kmvKkf6IPxTPPsl+Ik29JnUIkz9tUdqYDFrLNdLfddJrM57ENbj7mlk9z8g== X-Received: by 2002:a05:6402:2743:b0:5d0:bcdd:ff9c with SMTP id 4fb4d7f45d1cf-5d972df6b1emr13814600a12.2.1736627538774; Sat, 11 Jan 2025 12:32:18 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d9c592ec59sm460727a12.30.2025.01.11.12.32.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:32:17 -0800 (PST) Message-ID: <5aadb2cb-3328-4126-89c5-eabd78181f30@gmail.com> Date: Sat, 11 Jan 2025 21:32:16 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 09/10] net: phy: c45: use cached EEE advertisement in genphy_c45_ethtool_get_eee From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBG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IgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org Now that disabled EEE modes are considered when populating advertising_eee, we can use this bitmap here instead of reading the PHY register. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 8cb420c04..2558b535a 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1516,14 +1516,14 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev, { int ret; - ret = genphy_c45_eee_is_active(phydev, data->advertised, - data->lp_advertised); + ret = genphy_c45_eee_is_active(phydev, NULL, data->lp_advertised); if (ret < 0) return ret; data->eee_active = phydev->eee_active; linkmode_andnot(data->supported, phydev->supported_eee, phydev->eee_disabled_modes); + linkmode_copy(data->advertised, phydev->advertising_eee); return 0; } EXPORT_SYMBOL(genphy_c45_ethtool_get_eee); From patchwork Sat Jan 11 20:33:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13936185 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 183DB1B6544 for ; Sat, 11 Jan 2025 20:33:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627591; cv=none; b=jVjtJWQBgShnZ3GmzEtfpYrOeBRlKDBkC7sjebdyBziTh3B2/TpDKd8izMCkOOu3butXuC3JSzZ3xHFimJVC2mrseDqhhUB9C5U8HVocnLolCl9zms5UX/4/9CO/zANQcp82dLrSpliAFQGrzLwo3EnIe4iGvUNPEitB/D15lXA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736627591; c=relaxed/simple; bh=jGtGahYagxy3Gyd77TamWfvzB38Gr40tD223axSqGbs=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=UHTUYstcqVYTSHNt+P287IyvuBFfE9MjuZnI+nexvTrPJK1FPVgMYCGXq+YMsjw4YWvyAfwBi5mOURf80YJ2zqBFdB+FsSwnPhc7eMo8TK7hQFxFdK3Rec3kiK8/mWsd7kPRvw1lbHB3BbjefLl6Q+Z2tI8pZ3BFAf4niFolpYE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iiBsJ5Gd; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iiBsJ5Gd" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d0d32cd31aso4268681a12.0 for ; Sat, 11 Jan 2025 12:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736627588; x=1737232388; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=rcgKwGYcM1PuXm8ew0W4bT/c8oWqvFDjfw0FyL4R6ww=; b=iiBsJ5Gdd0Wkmhbu2hCXkzJ6cNqt5/VxiOulfSbEodoKrTnt+rP0WAbpHHmdzonnaR JqZj/vVXqGed+RqlZVb/XwatDjugTiF9inVlXgFjIChHWIoSXjYbMC8Duj4SqttO7/Dn LrCwjWsXSei0RTNKxH5pzW2U+qOO4mFLP1sPHB0othVB0t5xPEK4jgn1/S8Kt4gDaQGK tQgibA+ozhWGw54tFVW5LGbHwEkh/gUi1SYqCtaULM8PIYdpspkXJ+wPEjjmhC+4WnSl bwpQYZDMjhOjfmjSx4ZSqt4Sr0E2KC3qMZ21qqyRF/whbpRLnkZR62YrOKmAw2JnR2C+ Vrfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736627588; x=1737232388; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rcgKwGYcM1PuXm8ew0W4bT/c8oWqvFDjfw0FyL4R6ww=; b=iEwAkmoNl8vULVxA+0p3Tsfj40E1h/HeROv2PwZLUJtshOMXVYp4DDpBGPwEalpUlD 0NRV5kjFGonpigog003jRhJdsCu6vUeRiOLXzHl8EnvFoyugGnJ4R1kI2frc5w7ucQCG BiBZ0/KGEe/fSFr828wOyrp3RUz43OTmqEIfPwqFqs6fMFZEeOTUQmEdvpOiOmavkxxl 51nlnRtLJmxSSnOQW77sI0vAhHEguu+ESfFXNAg8kj0/MrTmvP+YP69tvzwIc05Dr8P7 +NlhXNreLqeQHJ8eTANoYKz/qG+EfIHF/YptZuUBxT7vxyQ0gRFQBjF30b5lItwE3Ty8 q00Q== X-Gm-Message-State: AOJu0YwywhVrDHaMEpaJrkSnb4DLgV9zIlndwTCLxO85KR3eCfIccNap pFSlvw+UHgpGHkQcUuzAzmPcdLfP+Zs/NoNr+3kQaTIOVvhIDgv0 X-Gm-Gg: ASbGncsL3bfL8MKuuhhxknGfHVl2MtBEg3g5WgV0QTne3N624C76QwCiGUMR105z+nx 5FqpPY263vRDEVWgXQalMWUcKOkMv5/AHWHGD9vv1wk1DdY3GZj0VjU35CmRuxB+wOt0R018QGJ SZJdsFvy2pNtNzM4VLmX7AAWpRk3oLLkgHEuLxZNn2Wcd0GDlA7cALdM0If2DQmsLSy+y9LPRDD VuoMFbabVgnQedtOkg3HR3qh9lvnqq1XgNAwNYvE+lPeWbI6NVmhHg8kd5vd7NQTMXXP4uI1AO4 igZg0zNyZUaJCj8nSMcS6Zz6XVPaWv2LX4W7tOL5MjbI0iPZ9yeeDJ6SXOBPVm/Jo1hP6VVgS7D RtIEX8nfJnkUKg8UphkPQlUR+cleqSlaAkxoYapS2koGju8tO X-Google-Smtp-Source: AGHT+IHGjG5qYYOapbmnFhtb5o+jf9xWlCW8L/tb3qBPfESDc/RC0ZcvXMxmSERTvu4DkHGp4hpydA== X-Received: by 2002:a05:6402:34c2:b0:5d3:ba42:e9fa with SMTP id 4fb4d7f45d1cf-5d972e1c568mr36775975a12.16.1736627588155; Sat, 11 Jan 2025 12:33:08 -0800 (PST) Received: from ?IPV6:2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd? (dynamic-2a02-3100-a90d-e100-d8f1-2ffc-4f48-89fd.310.pool.telefonica.de. [2a02:3100:a90d:e100:d8f1:2ffc:4f48:89fd]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d9904a4127sm3036106a12.77.2025.01.11.12.33.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 12:33:07 -0800 (PST) Message-ID: <8f2bacfd-b987-40ae-af56-b26d62d2a471@gmail.com> Date: Sat, 11 Jan 2025 21:33:06 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH net-next v2 10/10] net: phy: c45: remove local advertisement parameter from genphy_c45_eee_is_active From: Heiner Kallweit To: Paolo Abeni , Jakub Kicinski , David Miller , Eric Dumazet , Simon Horman , Andrew Lunn , Russell King - ARM Linux Cc: "netdev@vger.kernel.org" References: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8fw5qM66MVtdmEljFaJ9N8 /W56qGCp+H8Igk/F7CjlbWXiOlKHA25mPTmbVp7VlFsvsmMokr/imQr+0nXtmvYVaKEUwY2g 86IU6RAOuA8E0J5bD/BeyZdMyVEtX1kT404UJZekFytJZrDZetwxM/cAH+1fMx4z751WJmxQ J7mIXSPuDfeJhRDt9sGM6aRVfXbZt+wBogxyXepmnlv9K4A13z9DVLdKLrYUiu9/5QEl6fgI kPaXlAZmJsQfoKbmPqCHVRYj1lpQtDM/2/BO6gHASflWUHzwmBVZbS/XRs64uJO8CB3+V3fa cIivllReueGCMsHh6/8wgPAyopXOWOxbLsZ291fmZqIR0L5Y6b2HvdFN1Xhc+YrQ8TKK+Z4R mJRDh0wNQ8Gm89g92/YkHji4jIWlp2fwzCcx5+lZCQ1XdqAiHQARAQABzSZIZWluZXIgS2Fs bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjgQTAQgAOBYhBGxfqY/yOyXjyjJehXLe ig9U8DoMBQJf9GRVAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHLeig9U8DoMSyc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ply-To: <90b3fbda-1cb7-4072-912c-b03bf542dcdb@gmail.com> X-Patchwork-Delegate: kuba@kernel.org After the last user has gone, we can remove the local advertisement parameter from genphy_c45_eee_is_active. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 31 +++++++++---------------------- drivers/net/phy/phy.c | 4 ++-- include/linux/phy.h | 3 +-- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 2558b535a..3a62fb546 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1464,42 +1464,29 @@ EXPORT_SYMBOL_GPL(genphy_c45_plca_get_status); /** * genphy_c45_eee_is_active - get EEE status * @phydev: target phy_device struct - * @adv: variable to store advertised linkmodes * @lp: variable to store LP advertised linkmodes * - * Description: this function will read local and link partner PHY - * advertisements. Compare them return current EEE state. + * Description: this function will read link partner PHY advertisement + * and compare it to local advertisement to return current EEE state. */ -int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv, - unsigned long *lp) +int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *lp) { - __ETHTOOL_DECLARE_LINK_MODE_MASK(tmp_adv) = {}; __ETHTOOL_DECLARE_LINK_MODE_MASK(tmp_lp) = {}; __ETHTOOL_DECLARE_LINK_MODE_MASK(common); - bool eee_active; int ret; - ret = genphy_c45_read_eee_adv(phydev, tmp_adv); - if (ret) - return ret; - ret = genphy_c45_read_eee_lpa(phydev, tmp_lp); if (ret) return ret; - linkmode_and(common, tmp_adv, tmp_lp); - if (!linkmode_empty(tmp_adv) && !linkmode_empty(common)) - eee_active = phy_check_valid(phydev->speed, phydev->duplex, - common); - else - eee_active = false; - - if (adv) - linkmode_copy(adv, tmp_adv); if (lp) linkmode_copy(lp, tmp_lp); - return eee_active; + linkmode_and(common, phydev->advertising_eee, tmp_lp); + if (linkmode_empty(common)) + return 0; + + return phy_check_valid(phydev->speed, phydev->duplex, common); } EXPORT_SYMBOL(genphy_c45_eee_is_active); @@ -1516,7 +1503,7 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev, { int ret; - ret = genphy_c45_eee_is_active(phydev, NULL, data->lp_advertised); + ret = genphy_c45_eee_is_active(phydev, data->lp_advertised); if (ret < 0) return ret; diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index e4b04cdaa..5812a3f12 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -988,7 +988,7 @@ static int phy_check_link_status(struct phy_device *phydev) if (phydev->link && phydev->state != PHY_RUNNING) { phy_check_downshift(phydev); phydev->state = PHY_RUNNING; - err = genphy_c45_eee_is_active(phydev, NULL, NULL); + err = genphy_c45_eee_is_active(phydev, NULL); phydev->eee_active = err > 0; phydev->enable_tx_lpi = phydev->eee_cfg.tx_lpi_enabled && phydev->eee_active; @@ -1657,7 +1657,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) if (!phydev->drv) return -EIO; - ret = genphy_c45_eee_is_active(phydev, NULL, NULL); + ret = genphy_c45_eee_is_active(phydev, NULL); if (ret < 0) return ret; if (!ret) diff --git a/include/linux/phy.h b/include/linux/phy.h index fce29aaa9..5a6dcbd8e 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -2016,8 +2016,7 @@ int genphy_c45_plca_set_cfg(struct phy_device *phydev, const struct phy_plca_cfg *plca_cfg); int genphy_c45_plca_get_status(struct phy_device *phydev, struct phy_plca_status *plca_st); -int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *adv, - unsigned long *lp); +int genphy_c45_eee_is_active(struct phy_device *phydev, unsigned long *lp); int genphy_c45_ethtool_get_eee(struct phy_device *phydev, struct ethtool_keee *data); int genphy_c45_ethtool_set_eee(struct phy_device *phydev,