From patchwork Sat Jan 11 09:02:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935950 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 9DD4224B259 for ; Sat, 11 Jan 2025 09:03:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586189; cv=none; b=huOe73UxWumiqPfKF8F5C9NPg75g/nQJClX1AR4lWi4Hp9MVHgJPSoHLfzbBF7eaXFVm0fNXBFqUkbWuQtW+2oGiAerXdgKiBNRnE5h40ji+CCn4SofZgmt9lgGrOCwO7lxEPyxo0IJNXoYJTRaFLdu22+W/zOz9sTLBi+lhOvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586189; c=relaxed/simple; bh=Cf7M+ZMP4gSExHOq6C5BklT7emUjrLT48BvByhJ+frY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=WAw+elQprWIl0PPwIPBPH+3wC7Yakfad9B81+z7L4kZqYRbAwopz5DVNe6dDrYq4+gGLuPOZrvQSikrN+nGIMv0AiQ2eUn5VmKH+Zc3cG3ZVkGaAljCkWb0ZJLQvhQUfxnfiEYLq8qr0fk36cGU6jMb7FE5Q+UAO7l6JyIpZfi8= 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=aHiXk11L; arc=none smtp.client-ip=209.85.218.50 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="aHiXk11L" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-aa6c0dbce1fso383422966b.2 for ; Sat, 11 Jan 2025 01:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586186; x=1737190986; 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=aHiXk11L1ltGdZBbCAoJRifZ5AW722E/UTjAEVeci0/YYuor8f1mFcID6LZljRgyXF bCG8X+1cJ+YzAGZtY8kBGBi7StogmEUh8gi0NRQGo+8PVEH5m14rk01TuqXeA2PnTsLM POwcqtvIKHpzkSctI3h6n27ETbDiyPF4ljTTpLN75nyqngsoAq8gOs3bH6yxkKWDDUga QQBnR2X6NpWsjHkTRKbwZMe5YrU2ZEzIaZ9dlebUT4qmP2+km9fj4kgMMJBEM6Fe5PGB 1McmXyWNWvOVJhqke9UyqpI/svavLfeUbqnJWQJejqwp8eCkUfCU4R3rmbWIHOOkF2zO lm1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586186; x=1737190986; 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=rRNf9f0NZ1FXD1xB25bMzpWYnX/Cy/teeh+rUspiqim39in6rbvJ5qZCYYlVE5pGft /IWX/RNHjkk7H6qnvFFM+oWVeYAdnX5dR5e2Adjcry8GWRj2iJ2sUIT/2F/mZGoBqGAV g4PdEriwySs7wZH694vaIjuswPc8OVHc9dMvz0cyJmOeuFUcBK6r8CUgVWW4z/xkctXA CzBUep4Ws34YpDf4eYV0cKj0q4nG3akbcuAwzGnIubF0DpQLyQ6X9WusV3EciXpdm8qb nGPqaZBTcIkHSSxy+JzlSApY0k6Y3DgddeBkI75ihZ0Qj0P3gf6GAR830b7y0tzNqX1u pRtA== X-Gm-Message-State: AOJu0Yyt+8gVvjla93yqdkmPZMUkRWOX1URmtgvIex9gPRrYrOLOLIHU 0IIi7cEtpkwPXplU0UBClFV39SmI+aT0D6cWqM2wZVeFAc5E7IRE X-Gm-Gg: ASbGncv6Bg83LWkBSDzGT82yHIrTQlPtfjkzG5eyphGZHI33u8spf5Hmlfo3pIw1oSq AcrpIRslBgQ3PBsDbSfEWNG7TZV6ZA/CA1AQAnMcqs52XNA0V1mJZiLukbiTAHQV61zYDlmIkjM AWwfn2qxh6aDfY4w5ou5XeUhqVYZSqrZAw3M9UcSJGR12VVQ0NrCuY1/3OJfskk4BGiuE6tNpTV ZyXnTwmJVJykvSXQGbVUPUveSvV7qlL9aSTsvvmMuPuYcfM6pWkbDjhpP3Cp0LnSSeaPN2cNXvl ruMyRgGItDJFXkP5UYcZICyvUQInEkTrPifoQZHlXi1rmX/1sF/GvnqMVsKhAVZtyo4XfXDgDzy rGg2SA/KDcPMH3uJO8wDVCfx6WZmnYQteEOBOdgWDYAVHhs5d X-Google-Smtp-Source: AGHT+IGZ8yDFCJ5GKDLhn7nTSykmsS+FFOMd5xV3rXptc2PW9mDfRht8nFauw9JIuUM3PdkTG92kjg== X-Received: by 2002:a05:6402:50d4:b0:5d0:9054:b119 with SMTP id 4fb4d7f45d1cf-5d972e63dd4mr29058014a12.21.1736586185702; Sat, 11 Jan 2025 01:03: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-ab2c956488dsm252001266b.109.2025.01.11.01.02.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:03:04 -0800 (PST) Message-ID: <64d6848e-ff0c-49c7-b4e1-6d43752c854f@gmail.com> Date: Sat, 11 Jan 2025 10:02:51 +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 1/9] 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: 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/5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v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 09:04:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935951 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 3494924B22C for ; Sat, 11 Jan 2025 09:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586312; cv=none; b=sIkBslVpOILV3SX/bmKRhjG22KNoYBi3x0q7qAOESA0CWa+5MlYIETrkc2738nFcZwXbP00sZe8tXmie5OgaECuaDfYAB8WBYkQNXXrl1SnOIXKqlprxiUfYY0cOfLuQEA1EOq8VZ8VIhm7KLOOgGzshTPdjzTt+5+MDf0wA5II= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586312; c=relaxed/simple; bh=EWAYERHtUNysaHjwIGobdCdTOhWtkr0aHok8S4aBOnM=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=okI+4xgyjWow5Zfwq5N1yKOWfkLsGL3Rqo7usBGZJ1mj0O7h2X7uqKZrCZKu5KubPAeTOcAutHb0Sn9mt+AN1zizL9izMq/Qu4ov4y3aigtI0QI5Ad/A29c5FaPqhFJkgnDaKktm4tLisIcTePsIsypXoH8mo2s4tcvRVEfoLmc= 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=eB++ZduB; arc=none smtp.client-ip=209.85.218.41 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="eB++ZduB" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-aa684b6d9c7so505796366b.2 for ; Sat, 11 Jan 2025 01:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586309; x=1737191109; 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=eB++ZduBI7G1TnhRQabEh+9zj5hWCo2zvtGGXmBFRgbxjIWb0BPsDNBP73oMQh+h/R qhX33w7zvEO2wrJhIuecvRHL0KXv93t0QFNznewrXAVcfeEtenYqOsMoNUR+FGpZeSpL b7pbgxaNgB1KWH/Q59DuUkJulAg3X0SMWdnNDBV9Z3nToQ7MXSdd0vgaQp6azZ+rZoW0 cAxaIWJvTKeeZQLJEWJvLw4Mp2P/nEo2OXr1dwtG5hCiPaef64434Dwa7k68nA46+blu 3ehlONmglBcZNjW12h4HDlz/IlrEUV67p1xMQyW69wFDArrD9kiuY7ek8S1P/WQ/qVD+ I4jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586309; x=1737191109; 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=e21tMRbbladJGnQ8n2bCU7T+3oBhGwUwq+9QTWaLVzAhc/cqWqGbgbRO31GHxtD6yC 1XmDndhf/MvJNXriOIaLqKU2HqS5D1Fj9twY5+dGJKSpT5BMAVtgA9MgalfyK+BbSqzd JpvfaNLICcaAX2NfcN907incSt3B1P950RaF8Rla6eVhgf2lVEsm2GxKlQEvSzU0tG4R 7e5I38XwnrUThQYa4ICjAGaX28xWWbItAmRmQuy1eawMcBQYm9X8P9E/zxyF5BEt8SR7 aRjJJAg/qoBpAUTzMO7reElQ2NaP5sF36QLywIp3E+1EyssQMyo4nLMO2sH+cHmNz/rq rYbg== X-Gm-Message-State: AOJu0Yy2+XsNBGcL6bymipNdn0Ll+euzDgezgfS0+1PBbhU0BhC70gVN 72TIIt5+c4fJvdOLiw6BD7EigwLkPH1FoBGvHQ7+NOJ0lv3dzI8j X-Gm-Gg: ASbGncuPh7GfcI5ckOzmd5tEscypBIjIRpIGZW0dpdzZEhpEZrnbCf/Y0Q/0XzLhwND U0KGRuIoKBsgIYSIOhbtUms9MVXwOsa8RCs9oCwBt3GKjXaL8XJuOXqLbi3JpDG6Hhgxii/zmZd OKfbgrVrFu8RF0NAaBlYjJiHXxQNgkOtl3O2NcaV6652OzU1GQC4v5snf6iyopxL9sBCL6MXrnH pbyJb7HDcaa2YPObyK/fGZlR0FEW2saOSBS6p//3A5tQe30P3efBMPqXaoqEYfysPDvB3rZGS5z 4TGnES+HH3B/7dlmtIq+SepAPQ4R782phn8nmgMupaEPx29XZa87+Pe+8td6wlkX6akJtdZq4z7 HLzVNBwYk1I6kOon/QVD2Yv/mv23+267DqHEnMqibliSKVhde X-Google-Smtp-Source: AGHT+IEqEGfxtaEgDNegpvhX7QSA4uPnwWLZhEkG1VgGqFUlEkrB24y8O6JBE4mtInJaOvnAZtdVzA== X-Received: by 2002:a17:907:6ea4:b0:aa6:90a8:f5ff with SMTP id a640c23a62f3a-ab2abc8f08cmr1037008466b.50.1736586309343; Sat, 11 Jan 2025 01:05:09 -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-ab2c90d6838sm256129866b.55.2025.01.11.01.04.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:04:31 -0800 (PST) Message-ID: Date: Sat, 11 Jan 2025 10:04:31 +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 2/9] 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 , Realtek linux nic maintainers Cc: "netdev@vger.kernel.org" References: 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/X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7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 09:06:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935952 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 5E40082899 for ; Sat, 11 Jan 2025 09:06:04 +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=1736586367; cv=none; b=GuTw5CqknD74SqwoT8uhe/W0SoXdexLXa3SDMfAv6WcaJxM7LWxhRNuFSqVusRfBMBXjIJY01WMLWsZZuiLCjaYEVUxU4wAH4LYZbolGwwG0Sf1IFP4tJEaqTWmmS+66wce2MJYIlR1J/k3Tdi7RPCxETRKubaxCm0kKyNywKqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586367; c=relaxed/simple; bh=Bqdpjiy2Xyfkq6Z887WJ6xXr5dKSyoAtEYjATBOmHf0=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=OR2z/xktL+BEgjqujCGMGLgV28V6hMNS5vq4HRoR7/nBZnIiAkLL1ujXDiJuxM3uH0Y3sKVm/YLHWKYeTkyJTAoP2reurnehDHztm2tiepBmvW8eqOhVfXkGymqPTUeG7wq3zmlpEXfNvSTnA61AWURoh88WqOL24Da70oAYDHs= 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=Ibw01nRB; 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="Ibw01nRB" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3f57582a2so7407141a12.1 for ; Sat, 11 Jan 2025 01:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586363; x=1737191163; 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=Akm4k8GByIY19KDTwnJ73KYMOApsswqfySbu8WP9SQo=; b=Ibw01nRBEYSknr46Ce71dSAi46R81a08KxLVHVoN8pj5p0NMW7GdYjm5yCktrE3EMv e+pch0SLpsg/UWofCUoBHWL3Bfoatbmqhgb7A4AAjqE2RtHvm7/3TFST8VzWp1qI4CgX oVF8eMFiHlDHpvdhcSOj1cz3rhiJ/hezKyJ4YPnRD4lGiNN/JpU0Hi0pz4RVtdzqnFsO sHYlcPy4WtFpq8fxnAVEUdWeDpkyAp+2ZWcKda2prxdvlWg8msMzueQp2Ry2HRmrlOPc Br4D4HB904/toPu2KHcw7yWSGlciKc2BTmHhB8DH+Q/JxQ4POOZHc3K0wlUhl5dPNi3z AYBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586363; x=1737191163; 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=Akm4k8GByIY19KDTwnJ73KYMOApsswqfySbu8WP9SQo=; b=cw7AE6H4AFaXggN03If2o3FdT9xK+slQChq9TfdVfdVzaU55qulKVwgprTj7NyqVFT 0gg+gTIRE08zwwCG7eKxol6FaqhhMb/wRkCJAqx52i218VwjD8gMHdQ8v2CJ/7XMxzGr TzKLkefl/1vATcYZHFIHw5zrcsW0zPlhRzEyPMCxOrBuoHT/vFN2nTLa9m9lVL06QEM0 ysnih+EW3UuEyQSpAHnL08WMjEbjdopXqiU4fXjGIX+sEiToQQD6hza0I/yhE4huYATP 6EB+M2mJN4vr1feLZ09Gxtd7IRvwf2i4wvrXaXgBP9G0nNJRVqUtZF3t/bQHTiXiLJHf d8XQ== X-Gm-Message-State: AOJu0YyeGr+IWBBR0pbM9cw7RYc0nLtSXcxY4vdZgsJJ/yHblWVXdCcO +6mDSAfoB7rQU3vLV9gf7V4Dcykvz4jMzU6741I0U4h9Wm8QlNOh X-Gm-Gg: ASbGncutepNvNnhCLwKAHjKN6YQ80l8sN13diz0fNv164KKeO59B1xrWBafmUd4ChkV wJNW94bZRzNXUe37u46Tkycsc90gICo/44TYFEg0RqC1wjx6Tj9UTrlwqZ8z+I13V/ZL/ScBm0d EQSS9Alfb57CgwQgc+hAmNAy6vDQGdwNAtnTGrpuJHU3Z4ZdMhqmU+uwf/vEtVf9kao/bWDCi56 H30ldJztDknBxoIzYb5z3ARbgJfjSgtWswZQYEy5e/EmtZnBEmbFnmqP9uTILN4l8f+8pAejPBS v5SXZpxvEvsP3QZ3466aK6BOf2nwlwL+PoqABbarZgAkJyKpYwTFkrYPernTzziJqy8JvlfA36D TqfM7DvYOn+67Kc2FqkiKvVVgEE8v5szMXARFRRiDdIrGyuQ6 X-Google-Smtp-Source: AGHT+IGmSIVXazpsJ2Olbax9HiOSuXo+2QsUcPR+saHjGdS6oKKA8lVJS2imXwX8UqoxNDBWAqU3LA== X-Received: by 2002:a17:907:9605:b0:ab2:d837:c064 with SMTP id a640c23a62f3a-ab2d8381998mr682574466b.9.1736586363218; Sat, 11 Jan 2025 01:06: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 a640c23a62f3a-ab2c95647efsm250481766b.117.2025.01.11.01.06.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:06:02 -0800 (PST) Message-ID: <5964fa47-2eff-4968-894c-0b7f487d820c@gmail.com> Date: Sat, 11 Jan 2025 10:06:02 +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 3/9] net: phy: c45: don't accept disabled EEE modes in genphy_c45_ethtool_set_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: Content-Language: en-US Autocrypt: addr=hkallweit1@gmail.com; keydata= xsFNBF/0ZFUBEAC0eZyktSE7ZNO1SFXL6cQ4i4g6Ah3mOUIXSB4pCY5kQ6OLKHh0FlOD5/5/ sY7IoIouzOjyFdFPnz4Bl3927ClT567hUJJ+SNaFEiJ9vadI6vZm2gcY4ExdIevYHWe1msJF MVE4yNwdS+UsPeCF/6CQQTzHc+n7DomE7fjJD5J1hOJjqz2XWe71fTvYXzxCFLwXXbBiqDC9 dNqOe5odPsa4TsWZ09T33g5n2nzTJs4Zw8fCy8rLqix/raVsqr8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fFx/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: X-Patchwork-Delegate: kuba@kernel.org Link modes in phydev->eee_disabled_modes are filtered out by genphy_c45_write_eee_adv() and won't be advertised. Therefore don't accept such modes from userspace. Signed-off-by: Heiner Kallweit --- drivers/net/phy/phy-c45.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 468d24611..b566faba9 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1559,6 +1559,11 @@ 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_and(tmp, adv, phydev->eee_disabled_modes); + if (!linkmode_empty(tmp)) { + phydev_warn(phydev, "At least some EEE link modes are disabled.\n"); + return -EINVAL; + } linkmode_copy(phydev->advertising_eee, adv); } else if (linkmode_empty(phydev->advertising_eee)) { phy_advertise_eee_all(phydev); From patchwork Sat Jan 11 09:06:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935953 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 22B0124B22C for ; Sat, 11 Jan 2025 09:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586416; cv=none; b=K2fs6yiO2v8S5n1Kf+CUh1rvXQTU9Hu4xTcUZcwc93giCau76wwm3WpmZ2OZNs9GQk50n/caAgYcfRX+nhYmUX9gq+IdO63CPcq3U+ToqnhhUHZIovbWL+YHN69WviewrdgtnIc2Ns4ZD/teUWVHI+fo9zxPXq/omyxeIAecgfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586416; c=relaxed/simple; bh=jPx1NDxNEud4owSbvYgV5w/KsZRT+U7tOEdh19pm1Z4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=Ec06VHycZ7NHoBTiN8C4Egio8uSOaVXVA16/q78XYBPuaTx4jr/TryT0N2aa1XzlN/+g0f7xox1pCdjxuaNJdHPh/9c/zTMVp+mLIlwqJV/tsEtvR0zI+NS0Tg0+rESM+J19tiyGOkXDOSc1fiSV9aozSuy4fmhMrCeyJrkwEGk= 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=nLhFZ0BI; arc=none smtp.client-ip=209.85.218.51 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="nLhFZ0BI" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-aa684b6d9c7so505960166b.2 for ; Sat, 11 Jan 2025 01:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586413; x=1737191213; 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=nLhFZ0BIXym9yNxKefJ+cPpQNDhrv2Z7b0s5HFVEDjU9UFbnPZfsBDgf9Tucem5YaI 7Ped3NUvP7XsrIZIuqkf3Ia4mpYGZjF7GtXeJeOS9tHyGuYFyEceQ/iIJEAP+ut4jjF8 emnH1C3A3hVPOl9RVcPkaceBHz4eYuaM+JZffJLRXvfBV/R8Ojp+3vF9xJjfguK2Rkzz BYYyfpeDEXGRg4UYjuf7QSTU7q2siCAmpdscIt8KlyK/YjhN981toho1UaglY2vknHI6 NQ52pXgNN8Io9utH9VuTzshrEkiVNTf+5Xe+SFEbbFmzLcALou/T/K/PwbtzpceQGZYB bKWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586413; x=1737191213; 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=tOJ804LvjnVXbHHcOVB1gMXK2hC4VkQz070L/w9JRDwQe0lwWYl9w0CGreIP/gX95r zDWSngFQM2NTInO0XnKSu/qLN9H1obyIMxvyAJhI/1yapnCaA6Zeqr6Q49sTLPnCtNsI QieArrx3PNL+GL18H4HlxqBG5xXC4rco4xm7IoScVcfX1X/ezyDm18fhaWOIDto6/2eD IX9vgIzSIhUKixQNPsQR9wC1REul3+SUH/TO85SbTPBb04TqkcBiALT6Ly85M+WZ8QAO i2tE1KtL6ppKT5H1Y9eTIORLKHIVE0YEXNYHJyQKv6VAtgTiksWL1XcmKnhDLV6uZQlz sYzA== X-Gm-Message-State: AOJu0YynrnvFMBPAKF7qv9q/OOevdDzbk1HJIPjoB40BYtTrIo0YbWBd 9Jdj052ZpyA2SDEuW27W/JpI2Y3ZXkTpWPwTb4nWFEt0Mwt1emMo X-Gm-Gg: ASbGncuI9wJZ7cvZJPq0wpaTvIzS2FyMVEuyXbEtUJ5Bg/KETtZHvJ8IWpjjTPiCoid DwvumOcDkXxEVuWy4xbOzakdBcH3PIqIbSo5pSpRUTOmM0mOTg0sTkfI55meWfwXX0SXQ2y3+FT EAGqwzvTYUwMgLbyN79myatV1tovJFojx6KPKxBUu6I0GVmzsyWPFDNnproSi4J1tPVGl7lrRCF Hy1DKOBPsVRBz9zCoouXvvhHDAlUZFCbe9v5A+6aSG31mj6UmYs0vLNpShhOGMWkUf5f30sV/Zg s8jbBW+YFiY+hsvOxh9JmmC2Kr69wehlTGNrQs9NQrVNZ+c14Jyzup6ynbK8nmkkWcNddI7ZQwZ 0J9mX0QmxIhzDFOoE2U+MilRKED06VOlyU2q3s4kswNJPlC9z X-Google-Smtp-Source: AGHT+IH6AcWLcjO7Ho1qKu0PdqTcBn6NPCBZewCtQg8eytg26RbaI5qXU3129V+BXCPljAQCND+MoA== X-Received: by 2002:a17:907:1b03:b0:aa6:86d1:c3fe with SMTP id a640c23a62f3a-ab2ab6705b8mr1356227666b.4.1736586413365; Sat, 11 Jan 2025 01:06:53 -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-ab2c90dacd7sm252525366b.70.2025.01.11.01.06.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:06:52 -0800 (PST) Message-ID: <1bd0087d-0e10-4f12-b6f4-32ca423cf0e0@gmail.com> Date: Sat, 11 Jan 2025 10:06:52 +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 4/9] 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: 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: 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 09:07:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935954 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 4BAD282899 for ; Sat, 11 Jan 2025 09:07:46 +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=1736586467; cv=none; b=EAehYYkmU5qrIGZnDdNaUdP/buPfhyilKucKBntEXyXzpdteyQe/DdYlQMmciAQUSli5K5DtyQQpOpuTbeTQcSGoGerNEuK8f5lo/+5ufAd5UE8V9uKeDTWmVFWhQ4TvS8POpqAZElsJWs85v+f7OqL5nBaBgsGrEoDrb6wmAS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586467; c=relaxed/simple; bh=dMnqu2NFxklOsSsinY1qryXx9RuGGQCtBaDejSngLQE=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=HoTJ3EdLeE6lETYAuaQqbOc/jR+78IdkOLb6zJX7OdsTGpiWubWLc4xq/85oH2fQk26X+oOAWh8nFCrUz26f/Gv48d73gdE3rtG8ICmcWS8Qe1JuehqEt98U8ackwhGuAvT8aV9kFhTZbPS6lUahCfKDMZLnDx8H/+ngBgIcp+o= 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=KG8d8pZA; 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="KG8d8pZA" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5d3f65844deso4386729a12.0 for ; Sat, 11 Jan 2025 01:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586465; x=1737191265; 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=KG8d8pZASpf8zkmxd4noN5cJGY+An97/fK/XIrhD1MMKDFIXQt/mXwXpq9ZNK6lz69 mMGLamUwrHyRJ+3r0MeN2C3iiQ3DFo3Ci0wEA7NgHzHVABnag554SQc6cCYHbjdPXcke q1VB/Og2S2ecLZYyVc2sUap9KdqEaT9GTvxaDIPT3gwtH5BrYrUl2mAg4o3/YjEDNJ+S Of+kxpXlayngkm4CUr/dWA5pXU6lA+PAdOmk5zDtJpKkNFSGGUwMnrLfcEzznyRKuLBU agyBCOwnhnrNklZzdvQrL8xpgLtiwBCS40Ag3pbwPSfdfvyTwjIK7/mCNZO+pvxEIGWs JSyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586465; x=1737191265; 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=ixwon54mn0RcPDS8HDreJyDsdolSCB6uvKAW2kR/mkMCs5xy2X8A/eGRP5v8eToqcS cRvVbth/OM5K2JtKI+a2e+rgWGhc+r0i7t54zap11SckfYc35QIHLNq9NR6044CT0M11 CHN8BNAuwU8qzWt651wuwhJ8OjD6EBW8jWE7gIowZiKBOY12XVOJA3U62C4e0ze71/dk dliAjDNYXDDOPXUTQ0fXqXFOhpC2FF8IhV6AppNQK9MNg3hvM1XqCgobIDOW/jhrirbi i+4YqeEENm57o3/cqn4MfyXm2DI3OBOgJLoMpLCVpfh9Y0yDFm/pxFESTMpE+Z85phJ7 dvYg== X-Gm-Message-State: AOJu0Yz4NrztY4KQAmS6rN6WQkbu3Ngjt12Qc3jBsDg4KI/cNTi+9PYX yd4r+VKmatRZuYaI0lZypFkIGU+vovx0hJEtolJ0W0GK8XnoVGXq X-Gm-Gg: ASbGncuYEVQV7AWSXVjZjyF/z26EeFZVOn3xeUxn2Gki/ryqNmAJk1GntipXbbUEU4C zftQc5QL3sIy2HAWm3LV7UC6I0dU5V6Aj/4qTBcOUKk7PZiZtO6oW6Y17GGoTUtSPS9gV4CrUcu /mz8fAptQzYH1SQ6isT1G3NIZn6DNmMDHKKFD1U4QeuIIuAG7mzGONgdUrdS49NnyYMegbKp6NH 9cwikkhnTWQtXYnHa5aPNXdDbBsMp9eMM6xjPSUS7GLS8DAl0bRu5UCiaOCvjmEP1su7nVVBYt5 5Vcru/uXfbXeboiHMDZHvDIBphBYKr1iQDS6jKToLXnWEXS6qNgMztVt8RDpYpizEib7MxVD62r dP1vvsMm//vL1aVgbR4PLqLCkLlA64fMxa4wNcTOkpfZLWr6F X-Google-Smtp-Source: AGHT+IEnwOB9RjQvwIgT3m1N4dmZ606vHBelaQgvlF+dtjNsuak8yelPFUs6R41A7NVEdxABMrqmuw== X-Received: by 2002:a05:6402:510d:b0:5d3:e45d:ba91 with SMTP id 4fb4d7f45d1cf-5d972e6e09fmr12793033a12.32.1736586464690; Sat, 11 Jan 2025 01:07: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 4fb4d7f45d1cf-5d99008c37csm2494648a12.6.2025.01.11.01.07.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:07:43 -0800 (PST) Message-ID: <487d87a1-7268-4ef4-9bde-435e61c7495c@gmail.com> Date: Sat, 11 Jan 2025 10:07:43 +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 5/9] 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: 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+wBogxyXepm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RlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 09:08:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935955 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.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 037BB24B22C for ; Sat, 11 Jan 2025 09:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586540; cv=none; b=SkIaRE4P25ybGu3WC2I6pqKkj/GC2vGBuuibk6URJYZ4AGbGnm8KJxCZ81v/4Kk1xcdJpR3R2OoGZkw0b7KQZXCWf70aZcI6yUUpIWqHgmp7W0alrW4Xc4YYEoq37DR6e7UQrZRNLQpxh8ecfxdNMpI524TyPPT+y4CEun8ncSA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586540; c=relaxed/simple; bh=E3x2OQoXJqKkDTmlqFVNtpZpLpsrweRHWHwI3zrKpyA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=uk9/6kCig9UNmE6sT8/5/zMgDmzoVk0EvWT91LyotjsklN0NmDVMD5m7CGNjr6B+B+WTzaqTAyGGD4UOhJ/V/p/3nsbcKRHsBvnz/cYXJToOB6TnHnoofpPRbpqAzKjz3fyQk1GSiI3GhVPHWz8E1r58x6+rXpBWVn0kRNENCzA= 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=KDAXr1DI; arc=none smtp.client-ip=209.85.218.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="KDAXr1DI" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-aafc9d75f8bso540520466b.2 for ; Sat, 11 Jan 2025 01:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586537; x=1737191337; 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=KDAXr1DIVjM8cvcy2lYrQtTslVn0ts7/lDi9IJkGhqeMphdY4o17J4gK4VMrhpI0zx cWBMT7jYheSAzP5WdRVz+W8K9gJNnKdLbRWvx6bjSCL+ymWrQw5I02DbpibofqKilLnG 7FcTbGVCvF5i+UycN8UHbG20Tw2PptcqiUAIXP3w4Guhco5J4HOoWpuJe3oWnFF8BQmK ADygnnhz+86FM8yZ027M3milPmoSQYRHt4TX/71NaYXhsj74Bo8RQcJ/reIL0miid6fA 3OXDbL1ieUtLhIikdgl5vXZ32VkOfEYKXWBPTr/Jo4FyZhwcC7L59vkvceVPswqZmWHi S1Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586537; x=1737191337; 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=WAaIa/cUKADr/7MTMw1ZjioDvuPJBBpeia/EwCCm5RovYnPGcgYj5Jjh9CaKmJ5JdP P44mLADy0nsV3qG95txlFaN0FATgCGB5fn5ja17dlEjXO18/31j/ZguBBEU1sgeK7H7I I8h8vKwlJ+iGYtVAurorSfdfc4aGHvUnFcw0zFEku4z3/E2shOt2TIyL3jUBFfiP0h/z 2xiSUjD4k1iIGX9IpDt6TAmujUL4D6ohvDk5gi9T2Qimeyy1vpt7NUr9/Yar0w0V1bvK hLkA2W+hhOSOPSzcoDIHw/oMAIGvDFvFILUGmYR5ay8WSXZyI/kzxgGfxO5fckCOL54d ZRWg== X-Gm-Message-State: AOJu0Yyh9vGPAjqLrhmHLWS0T6/M+jNYfrirqcz5PBsm1GpWvCKXw4us ahu1Chamjg7UbwJuCLEtrqGScz4OqlQf9mFeKVvOyB21i/l13Uka X-Gm-Gg: ASbGncubt++n7EKlFnPYW0iqdXBXiMAN1C68+qKHPGIHvqZcq1bWqeRUMwsjeBaTLY7 x+QWft3lM5t25qFVRUggxdlgK6An30v9fC1WRTSh6HJhYvfqQe667ivZ2HZ/xWGtnOlTImJvru3 sOQ4m+0u8l5AylZZuR/j9xqayjkUuaTd+UcLCE+MUAHsBUob0L8HQa2cKu2V1FZAW9wCvgJo8fc VNJSWXG7BJh1e0AGryKkE9LfzuVcqSlIEQ/cieFjtK3TsQrD3tjqbjLAmtdlP+RKXbWlZCPAk6G 7C5Tr0SRJn1NGVCjmGTGbbYggTEXGzvobKeVfAg4o6IsxaGp9eRvLW86PgHy8+yHUlz0AhOEhrm Gwl7Rhe5qQW79gPpK0fSFO8lnMvhWuyzjS4E6fU0/5yX4PGmB X-Google-Smtp-Source: AGHT+IGu/5h2tUWjP5b81jTdtOkkkbtn1DcX2IVMS3yUzYCghpBZ26XfT1CABvcS+azvrG9HH7cxWQ== X-Received: by 2002:a17:907:36ce:b0:aaf:87e5:4eac with SMTP id a640c23a62f3a-ab2abcb12fdmr1305584466b.54.1736586537231; Sat, 11 Jan 2025 01:08:57 -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-ab2c905ecb7sm251483266b.26.2025.01.11.01.08.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:08:56 -0800 (PST) Message-ID: <19ce7463-46e0-4339-9204-f6a4322d1af6@gmail.com> Date: Sat, 11 Jan 2025 10:08:56 +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 6/9] 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: 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 bHdlaXQgPGhrYWxsd2VpdDFAZ21haWwuY29tPsLBjg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L8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 09:09:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935956 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.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 AA3E524B22C for ; Sat, 11 Jan 2025 09:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586596; cv=none; b=lSDHM3+reCAkizvAvAGzbBMOgazyGbciy52p+S8wI9K7w/FMI2CQiwWb4l/vAdh7GWRSL8TCbYq6RH4ZmLFMchmgrgajeZshSOyChO3p2F8YpwhFqmRpdfrxp5fv6hoV3cBoULP86WglD2rNpBMR9FgMpnJVYTYz1wfEuleVv3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586596; c=relaxed/simple; bh=vK1higLia5enz8xZAXpcNXIqqLM0PZ0d0Ghcb7N54wo=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=s6jTqs6D79bTXXdgrFLceqDQ8HwTsQGSTELc5PVEkTl8oCn9GIo/U3WduvVoORSkdCFK0Y7lT58TwSBppkZ65DkVWRGqKw0d5R540paK9Tsu+5u6bpBceCLiglhxiUGn7QELPCX3019Oh0i8FTBl9nhztOA+jmShBiGlQ7j9saw= 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=KjbGUkAr; arc=none smtp.client-ip=209.85.218.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="KjbGUkAr" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-ab2b29dfc65so426570966b.1 for ; Sat, 11 Jan 2025 01:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586593; x=1737191393; 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=v9m4J2VJ0FoMBNQpozaSbll1oWWctyBJQ3mpG3ZPzU8=; b=KjbGUkArNtA33B7KGzPchOjxQHh5IctdNrqxpLq8VrVP9Dzm3V1IM8XIeCjr3Gix6o 6QVX/UZuToe83K5Eur0tiuQyW3GYYlDlFfgficOoFZqCE8mvDnBUw1hyYoRGSGQVYlt+ pHVqtJOXGHKO12VzSEQlXtzxYGEK5rw+0fYXzn8JuG7FfDpgLAmuAgrlL8qdJmZIi4pf Eb1ngWwnSRgcXtPLuAQ7YqvzRkmKP/uk7IgJymzAzf5tCR/+6GNmDNr2Cme2Llx50uUO P4E06oEPRBMlROmiEKI13gdRpdUUGXaeh0x9kNjplYquIlTpGJCeuKc2LnFWb4fW6ZSI sn4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586593; x=1737191393; 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=v9m4J2VJ0FoMBNQpozaSbll1oWWctyBJQ3mpG3ZPzU8=; b=OGXWF423UoQysaK9GlyYlYul4NVqqHdN6yP7amJtmXshqzecgmHfRrNicTllKgiq7M Z4IbTxI6vTOilEeVogJXJD8VpcGQu+PhNro+p0TIbfFuc2K/h5+cDE1DGEHANNQv5EZH ksimu7OMWvJbecbHfHZMS8/uWkNtC+OyqntPFtQppSR9Il4K15w4UroEZqraD1OiXmOk 8qb0f8oUx3pzVY28hGNbjy9/aZevPru5teVRv/JygBK3YezaPjEu49ftc4QiY/8rWw7F b3baUjX4CYfrSScDla0qC6/egLqMOI0b4HMmZTNHWXmXFvbkdAshmpQsR/QClss6mBIt ndww== X-Gm-Message-State: AOJu0YyEjB4fkbkSNnAudt16lVigSaKqhdg2iPq+HeqpHyUIev4x45CQ YvcEf90+Oi+j46GwoW54DILqGeNcY3AooErQcAy4nMl2H0skIsSC X-Gm-Gg: ASbGncsBnvRPnBDEFC3v+7La8eUMoj5i9D1NyMMrzzlraK0NJfw8ibtyeZCoW4HGOmZ 0PQk2f3r5mLIhwIjC7OYjmkQu5YQsafyb7Ct3BheSEyaKph9sziPJXLxjMLjuDXqlAuNzpBDc+c buiB+aql018qYxbF4vOQSMF8smc1YH01QqfkIZ8/dodjDMavIkmGZ3eHTcbguJSV9EwKGsP6Pyj 4YAIw+Y3JySusEPd0gniz1MwJ+PGYWtAPAAv/ffQ3dxmDkb62lQcV2eApxu+twj5SU4lAfxZB8j adoOBehfaC4ERfwHHe/oCwC9paHbYr5QIwUJGB2g0cvJTYMqryn9e66F1nGHNGEH0mmWgEmDGUK RQH2oY4wO81h8uHQ3Rmv4ycMO/P5yfkKlCr5JiH7JRqdjM1Gd X-Google-Smtp-Source: AGHT+IH0WK49gLMCEHrXj7cXpWZbGYzfeSjS2vdXii0j5QxgnevQzgcehZaKPIAnXz2/k2/ES8oPLg== X-Received: by 2002:a17:907:3a96:b0:ab2:b5f1:568c with SMTP id a640c23a62f3a-ab2b5f15bf1mr790297866b.28.1736586592720; Sat, 11 Jan 2025 01:09:52 -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-ab2c9562e9bsm254220966b.106.2025.01.11.01.09.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:09:51 -0800 (PST) Message-ID: <88ddca91-5318-4916-a87f-e8cf8c15eaca@gmail.com> Date: Sat, 11 Jan 2025 10:09:51 +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 7/9] 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: 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/YkHji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8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 b566faba9..ef58d3b23 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 09:10:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935957 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 7E43182899 for ; Sat, 11 Jan 2025 09:10:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586639; cv=none; b=CdeZVNKCWt96PnvEug3KEuJTWrFeqHatoPyl6DSXd/F6kBwZgBTAK6PAREEe8JnPDpHC7Yqx2PZP2RvGMlMSyfARNbX0posJH0orD2iQsegLfftO2r7CRl/emsfwLZyvdh0ZEmYj+mFsCuYqXE0bXBmkXyqIMABy2iVLdh/vA5M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586639; c=relaxed/simple; bh=e3lGXnFJzc/6AN1kouqi/pFyvjX0OIBOYaqQogQeEY4=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=GHklbZvae6227T+JneV0uDpLzgt+kZDFZXdhte54w31T4qNyK+RCAgpAuJYu3ErAP/uISgFmj4jqrZNjO+3QlXFzZ9I6jXIdCtktAruM3v/cfWTrt09Lpn13vf8Mo6BAeRu/BwYNu5FHOQ4Fh0yNg71SoD4sWZPlTGRx4q/M6Us= 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=Moz/c6sR; arc=none smtp.client-ip=209.85.208.47 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="Moz/c6sR" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d41848901bso5170538a12.0 for ; Sat, 11 Jan 2025 01:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586636; x=1737191436; 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=h9PiRgSwcYASZLOtz5Zv08Qq54r8edwwhD8G7hSh+ps=; b=Moz/c6sRkrXPmRHa7H8pT1zh5AOgEx6+x8D5aX+oDZ8q8pDAc+NNVx5DS4Tk99Viw1 meRkXxsGrHcRASrmpkqTMmLoY7iwYw7fHAeIhgz4ZA++vCIG8T6co1m4y6pNBRpKnHZA 4LUDZJkR/K0D0122YHewjL6KCMDurbUHuOdr1NLzZRQ8EJyJf2oMh4+mT2rRe9pNo70Z 2GqbO52vGICjSGGjtz1FRl1XcJMEhCVeRV9mPWN73d6K4Qu2S7dbrcGeaR4bf3dZXzKt eAzpv2ajwbtmaoZh7kX+vMs1isR/5bHK9Y/7l4q8c18bjXX9BPSoyrS1Idj3t+UwXvXy Aulg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586636; x=1737191436; 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=h9PiRgSwcYASZLOtz5Zv08Qq54r8edwwhD8G7hSh+ps=; b=MbNuhJwPq8KowBtWggjBckuX3OCO9BReZnvtqKbqAe+31We07VheP0qZb46/dSpuN1 Dx+Rfhi+9nEMBx+G5rEL5GX7EzS8x1cI/Rlq+BoDeWAgTyca+arcwFhnospAtD4lfaiK ad4m0bGOhVbpI1GAq0CWZVAHPuDhlNqvhMks03l7w/hFzd/z18CHdc38Sqa0LPHSYmLR kba28VGj0QVbz3LA83H+R3wzYN2v3OH1oxtonklZdSPQHXSaYlypd9I8i5D3FFxIW0gZ 6Vs5y5HJ4ALA9o8oSepKdDl0mpxqj+N48ywGETfZeycC7/s6o1IR/ZpLk/MF8yAbRjCu wlFw== X-Gm-Message-State: AOJu0YxgDYnZITjzAAa5EAOE/rx2cE33ahTEn/0Z/dkQlQGp6jOUsrHO 4dm9fw5MukmZJhzwMy8VXy7bjXJOS+Lq7fZwbHhLNTed42TNvEbo X-Gm-Gg: ASbGncu6j/QP2fdIuYpS57FjydEmae6CTaxSM6uHs6cSR3GARGGd6GIMXO+sDxRev9D gNFkbw3EabLyhWX7d0GJhszfMvIvrqpPHseVzsyJXCG4qD6yyDkLGPq94XtK20hlw0fhkW2rBNU R/v09sG3fdYbS7KBybIFG0WanM9WMid0UQPbeDpoU5xjW3UCaSmCTEO/PO3IWMuvPmcHscpotM0 WGXGwf4fjowkfeV4L6PDzm2oMPwIM873MZ3b7JsQOsFx1XOUG5Mx3BIXbF66bvFJMAraPpwB8L7 6qvsyN5hPUzPfEjycULTofDdtBz1yqWTJ15VDrmukPxJ284iJiIJ4fMdHXYi+0jP8YBqSDfC7K8 tC4tyaRFY3bf5967KnSivxAluappPk9rCmyH6M1D37zaOqKeS X-Google-Smtp-Source: AGHT+IFtR/LZPTODQhGkPMF3hMSWV3ZGYJ0suAmwyzZti/IJNkhk4q4KaQdQUVMpgosoBUxBjjpyaA== X-Received: by 2002:a05:6402:90e:b0:5d3:e99c:6bda with SMTP id 4fb4d7f45d1cf-5d98628814dmr8380082a12.16.1736586635593; Sat, 11 Jan 2025 01:10:35 -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-5d9903c3211sm2487767a12.38.2025.01.11.01.10.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:10:34 -0800 (PST) Message-ID: Date: Sat, 11 Jan 2025 10:10:34 +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 8/9] 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: 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 mJRDh0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g21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: 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 ef58d3b23..6d05aef5f 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -1516,13 +1516,13 @@ 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_copy(data->supported, phydev->supported_eee); + linkmode_copy(data->advertised, phydev->advertising_eee); return 0; } From patchwork Sat Jan 11 09:12:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13935958 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 C6F4524B22C for ; Sat, 11 Jan 2025 09:12:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586740; cv=none; b=oSZtskbeu3IBGSS6qIyneLFOlIO8+8YwHfbqhJaMrOCbE98N59UWY+Juy1x2k0w6MugJyNWc7eHOPyeKz905QM/Ruy+wZXaFf3ycEhnEAcUPAjZSmNc7jtE0xS15Jx6//OmfLo9CSdkyWT9tdX66uQDrAZ0oO0+pTU6O1aT8Tyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736586740; c=relaxed/simple; bh=y8ouLE6cmmU99pdCwRAvS+I6FMygU1y65pjLmuDDNQU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=VP2PA2uGLFDOUs71ilTZq+VClZdvU7a1oDptv8opdNAei0Mg1ATsR5b/SMPddwEGChu2sUm6SKB59dEkkNe25OaLvElcrt7fN0IAl5i7rPAvyjKpH3BOa0MLQtB2oh3YuwgCBH/5Wtrwrk1jF0i9Xpqkx8fZ9dgNRn5nrbPEprM= 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=BaexYEFP; arc=none smtp.client-ip=209.85.218.48 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="BaexYEFP" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aaeecbb7309so518613166b.0 for ; Sat, 11 Jan 2025 01:12:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736586737; x=1737191537; 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=U+idbRyV9sdQR+SeiUkdNzw9KezYm3bCJqa2mqqjPlY=; b=BaexYEFP9zcXicDspRZZinarRx4Uc/zwnt8B+0AiP7LhNx9iROPJV0gfctm+lBQyiL 5KHAm/gBxtvc4xXeHXcbj5U3p3NDVbCYcRNCIttKsligxllNLba8PtUw+iu5WSdQhFGP POr+7aVXYde21IPRfKubiu8oN+aqNnUWoYuHKThxcc4e+7UGq44TFv+uxnQc9jzR7aQh aK7blHRngnICHE0qI+5Q7wGjqrkFunDPu1wPZqihFkBkk3hnj4VY3Qf6/ZKGNprMYxBq Bubbc8tpMDZcgdrHj/VIOWwRYJDIB3j58T8zkNYCLDpM9x3RFlqkmkFFC+ruK4zw5SmX HShg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736586737; x=1737191537; 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=U+idbRyV9sdQR+SeiUkdNzw9KezYm3bCJqa2mqqjPlY=; b=SYjf+M+SK9z1f4iOZ2Mg9a3D/g2bcNJ0N1aj2oBJb6atk4QtA2lHWzqrYuaDBjmjXU IkxbS3KWDr9Wop8ep2kNl7qCapMPFwkk/y4YlWJAm/Y/8q3tskGCf6a79gia3c3AoJx5 YQbBKNpkXz7R+rg4/c//7f5QWStn+ULUnASQ1UGvqNE7nqGNZ5oRsFzZwM1gaVnc1pw2 L+vpm/5CnhXhgryLtv+hN4RS4UTBfCM6thdzBpmEvaM7qNuEcZltMfLzVpv98SnTAuPI Rj5g/F5V899qE9zPGUXWIm3r5Chq5bsQufTI/YRjKi3jN/luVd8/oB0JsK54AzjV4ab9 3tRQ== X-Gm-Message-State: AOJu0YxT8TYLZoAVkpS9ifdV+YLd5+O7926kNCzsiuEAcz0vxaQF5Ud8 uMfFloZ1JvsJhJ8fok1gYAMZjyOzBJ1FGpqq/f3iFzeshKpMKEEw X-Gm-Gg: ASbGnctNTF0TpOMslJA+xPvlXbXrDi1mdaCN5BpJt/w5L165RYpnp9NSDL4QXfIJ+wI B2pq/6Ck5l7W2CR7+vk/xg9Mm6tQmI++/IXbpmXAJg8ZOd3no6TcSI/0y3O+KXO01qF4zph9g5L bXh4WCQv2MUHlENRaDFRDrQcHpGtDOEXw81y3QK/igkkQuf+LZJ6mQz71ztI5Y789DFrutN2SmQ pSGXsuK2ekgEZySoU4DEEIgBe5NflajFu8MBRY9HBC70Meh8fD1BKWPchtuZs8AK/TtLTky2MjL FxP/gHN1/JzyNh3W0dIR3AozYtb1KT+0sGoYsPc+RYiRCF6Z4nMfRvkB/G7i4wdiAV3IB3n42Ji bc6cP+TPt3+jr1nxaLeQ+rUtBKKRM5Vs8UO+9Us9CR080EPh7 X-Google-Smtp-Source: AGHT+IE5T+aBFK3GughzDow54OsnS9MTqPtocZehLcuoHHRLS2x3/O57pKcEMy9moAgsmeX+n2uzXw== X-Received: by 2002:a17:907:1c2a:b0:aa6:8e9e:1b5 with SMTP id a640c23a62f3a-ab2ab6a8530mr1076251266b.3.1736586736848; Sat, 11 Jan 2025 01:12:16 -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-ab2c912f165sm251355866b.83.2025.01.11.01.12.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jan 2025 01:12:16 -0800 (PST) Message-ID: <71a87ec2-5fd3-4edd-afa3-0253ff698fdd@gmail.com> Date: Sat, 11 Jan 2025 10:12:17 +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 9/9] 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: 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 AJbfg8HZEK0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egate: 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 6d05aef5f..7dd113df0 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,