From patchwork Fri Dec 20 13:51:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13916791 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.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 41C7A1C5F19 for ; Fri, 20 Dec 2024 13:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734702697; cv=none; b=sS8LBqvOhPnoRxu5GYbO3inuDoEob6iKQAOdzwqPIG6PjdMU+PIx0+cc4zUzOXH0RF90E+QULA8cbxFwZa4BBp0JARkvnHWpfnAWV+OJBbWYuZWRS3VB0KSZWvzBXbBDQGOjAveOtZl71/afxdE5ON2Fh7C/ndyYdsI6CYz8M7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734702697; c=relaxed/simple; bh=nplSBzwl31z+Mt/fY4US1/Fw5U8kBllV+HgOgwWKcus=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=gYlqh6DSHFqdmJ8u2g8778PgM9JYrWM1Ck1nVQWyBULHu5mZpW6aQb1LaM/YZUlhnO9CbDuLLhmRdsEAMBA5KAyqysc23zOLKMKAkudwSF2hXflsSFrSKKZt1x0dcd2e92v0dngEj9QgapSLwu1xbYLYFzPXd+W7uhf2+oef4rM= 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=E5rHx9xF; arc=none smtp.client-ip=209.85.208.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="E5rHx9xF" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5d3d143376dso2725729a12.3 for ; Fri, 20 Dec 2024 05:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734702694; x=1735307494; 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=ncBWufviQi5N362JzS8y2BzdkDuzo+WeoGCs1fgi/vc=; b=E5rHx9xFP36H+FsfZjJJ/746UqnVCm+vsrn5dQkQm5Jqnw+WCgW3I8IBX903J0iGIJ TDZQ1Vg3hfMwvseABK6ulwbhlAAgt+M6i9HnMNqVdF5DY+sM1qFjizWDd/G3SAauGiBx E9PZjvsY4jpECIe2RHW0klRCI2vGvt0LVqcJ33aeV8m3glxHrUVlrlHhJAucD0KQSLDH KPO47+Zw8zTvXkrEj/q7lRZCNRRdr21uRlW8XTWNFyRwPUtHHkKq8PH7dQ6G78VMtfXz 34A96CaJmd7OAARcCWqr6wumuKfLDen5exUVpLU4Rr5GaAGv5Ax38uiBF4mKtNSiyNny cSQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734702694; x=1735307494; 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=ncBWufviQi5N362JzS8y2BzdkDuzo+WeoGCs1fgi/vc=; b=h2D5syWW/rf4hUC/B1nMGXyL8dMM21Kmup2eFl/oipSg+hPgyniaKXRloCMt3nz5i6 ICqtOrZRaa6eHc8ZGbYP7ygC1re1fYv82/o4vv35K37QuFmz8dRAcQ4+AEUpD6udeoup 4zp59bl5XhmOLJ32AUoa1RNOdA2bZSXq2dua1sQZSwMEBmTCdm3yXBctQznyPhW41UCi DqKhB51hbWsLqTsQP+xUNDyzeqxIu0Xm8CKazWdF/U1ym27bkxp7SIXreLnVQtdAgpw7 P/9hIaqLUjBv0O5QGtfG5AnQaVEZAkBwqS1CbjmVZRkerAIRO0NfGrTBOR/358tMiV4h PVKg== X-Gm-Message-State: AOJu0YzUrRxaHo2nnA70+m0RFmAI0EgU/hDuTa7gytJgja3R3XmLOZNW FLnbbg69vpgIFuAdzlK0Se0Ryf5+g0E2L9U/WzZ92Rxv0VtDtgMs X-Gm-Gg: ASbGncvF9H4mVEIoNhY6ekW7YTKeQqXQ9EQ1JoSMwh/LVFQVREIGKMgFNrn7TlAF/IZ Iue9+hjIIsR1mR0qSPpCY7hiyuNT5aMF8/YfdHjfe6s/sY3mHWsrzrwwPEbDFxJsf05VrnmfAs9 FUV8N3M7MKFIIXzm1Qe3m1KU7N818yxbLRl040WQ4ETXlOmHgn9OzN5tkIcJak5jufYm1syUaaV MVpV2sXSHzwzMhf++b1jAhalPkcJlAwagCVte9totp36twY0gwB4jbEBgHb7GcH8QQJeLm93qWj 0hkCOnUo+VcyyUs9IUEnOU4FhsC12Hj/D6nGpUyFlTA5mQeZ//VAU24QdiYtyuilN4Ywlxe1BWp JevV6d4Bg2UqybMgyFA/SUU1xVbpyW+kPxBLNpRXu1g/ctMIW X-Google-Smtp-Source: AGHT+IGQFEZ9WpIURsTixlCe6uEso/9/2XWRwdVQX/j45RkPtO6SAusWtl55RTyiAcIn+dAWa49TNw== X-Received: by 2002:a05:6402:3217:b0:5d4:4143:c06c with SMTP id 4fb4d7f45d1cf-5d81ddffa67mr2667667a12.23.1734702694413; Fri, 20 Dec 2024 05:51:34 -0800 (PST) Received: from ?IPV6:2a02:3100:a560:5100:8565:bec9:a1c7:2d82? (dynamic-2a02-3100-a560-5100-8565-bec9-a1c7-2d82.310.pool.telefonica.de. [2a02:3100:a560:5100:8565:bec9:a1c7:2d82]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d806feddfasm1841255a12.58.2024.12.20.05.51.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 05:51:33 -0800 (PST) Message-ID: <77df52d5-a7b9-4a5c-b004-a785750a1291@gmail.com> Date: Fri, 20 Dec 2024 14:51: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 1/2] net: phy: micrel: disable EEE on KSZ9477-type PHY From: Heiner Kallweit To: Russell King - ARM Linux , Andrew Lunn , Paolo Abeni , Jakub Kicinski , Eric Dumazet , David Miller , Simon Horman , Woojung Huh , Microchip Linux Driver Support , Tim Harvey , Oleksij Rempel Cc: "netdev@vger.kernel.org" References: <942da603-ec84-4cb8-b452-22b5d8651ec1@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+1fMx4z751WJmx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hrsokjQEaIfjrIk3 rQRjTve/J62WIO28IbY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <942da603-ec84-4cb8-b452-22b5d8651ec1@gmail.com> X-Patchwork-Delegate: kuba@kernel.org On several supported switches the integrated PHY's have buggy EEE. On the GBit-capable ones it's always the same type of PHY with PHY ID 0x00221631. So we can simplify the erratum handling by simply clearing phydev->supported_eee for this PHY type. Note: The KSZ9477 PHY driver also covers e.g. the internal PHY of KSZ9563 (ID: 0x00221637), which is unaffected by the EEE issue. Therefore check for the exact PHY ID. Signed-off-by: Heiner Kallweit --- drivers/net/phy/micrel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 3ef508840..ece6d026e 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -1522,6 +1522,12 @@ static int ksz9477_get_features(struct phy_device *phydev) if (ret) return ret; + /* See KSZ9477 Errata DS80000754C Module 4 */ + if (phydev->phy_id == PHY_ID_KSZ9477) { + linkmode_zero(phydev->supported_eee); + return 0; + } + /* The "EEE control and capability 1" (Register 3.20) seems to be * influenced by the "EEE advertisement 1" (Register 7.60). Changes * on the 7.60 will affect 3.20. So, we need to construct our own list @@ -2000,12 +2006,6 @@ static int ksz9477_config_init(struct phy_device *phydev) return err; } - /* According to KSZ9477 Errata DS80000754C (Module 4) all EEE modes - * in this switch shall be regarded as broken. - */ - if (phydev->dev_flags & MICREL_NO_EEE) - linkmode_fill(phydev->eee_broken_modes); - return kszphy_config_init(phydev); }