From patchwork Mon Jan 6 13:22: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: 13927438 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 EF94835973 for ; Mon, 6 Jan 2025 13:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736169767; cv=none; b=Gq5Aj94BNsHZ7Xd+jVtXqdtdhFUNrGFhBOP/ElhhuzbF7VeSph5n5PjTM8tKGtmuuDCcX68D9jARu0T7BrcoLsP8WjsWhdkHT132weQfQ1NpmkzIG1nZFiJweOb0l/hcQp3Yq07ovMVk9dPYETXKVPWSPYl6/6rqFv8kUaluuKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736169767; c=relaxed/simple; bh=qf6wGoW8wwbfm/lMdY6ttk39lMhMUPx+zAofJQLnd2A=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=CX8rXY00pY0fo8YzEyMUXgCI+NNrDdIn4njsd4eqXudm4Y+gIj4mXVyEsBuvdX4jJ4IUefFMH2k59rHp9FHZPz2iX/C8qFK1rF7brlq2k0coOBr8HvJCG8ncduvfoOWllC9fpuwQSx9xqDEE/c0OdIxVrRdPKdlsNSah9dtY7mg= 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=WcwcQwBx; arc=none smtp.client-ip=209.85.218.53 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="WcwcQwBx" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-aaeef97ff02so1747387666b.1 for ; Mon, 06 Jan 2025 05:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736169764; x=1736774564; 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=S+t4D5QRfDjbwF/fWql0yMBexZnrw77uc2+xes4kLSA=; b=WcwcQwBxmLPLVDOKrOmmjOfe+hWEBl2iKaHpH7sEK8itOVwUA2q2KeR1qcW/CBEki+ OG1NjvaGFjScvv4qlPQaNQm6kmwL9EENLY11bj60N35Ne7opZbyVxUB0O4gu0H9bBe36 9q15YprUvb/o0NoECNqQQyutT43PFSWQjS9DNJMbHuoCtZ5PxeFcnswJXm5SGiazy6cx 83TxUGwYrZzXy9ZJk/Rgl+zNANkD4zqfmrKUnm5mqoP+vkMXw3g3PhLmPeRpQA/uKLSE jsUNa6DLWRowoKqEl/cPQLfy9qWN4MHCuBWkF4l4dDG9RXm0eTApXkkMR7cXIA//SxFR pOCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736169764; x=1736774564; 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=S+t4D5QRfDjbwF/fWql0yMBexZnrw77uc2+xes4kLSA=; b=LdJP6zGsNGcupJa6So7WjZo2T7n8r33d10UEe16vPLoXi0u8GI/q2oUih7+a08yYww B2LQUg0FyKtXR4SYTlZ8fmSAe72OOF7Sjw+nNXDoWnpFCaafCUay5Jeqtb032n6tXlA5 ZmjHaIgY/scAiyDjFm7gae6oh8tJxuNonGJREF6wH2yRPzAVxM7m8j48JdJDG85pz6tx K7VQAiKfUhlb0cxyDhTWeXt3cH8SkSIXXVdxVS5vnv53hBDsglaq+BzH4y2HjOkXUKh1 xs91dbcNgrbnMNbfaSaSRgx/Ouh+/uoJYcV0a9NyyilzNrAP4Y3IP+rc56FlBF/h4P6V dDfg== X-Gm-Message-State: AOJu0YwGsQIH1kxvh4SGuGPrrptrIV2iHRlwqBI4zUdDRcIK/FgEWwMY 12i1XDeWFX+ESV8wI5byQukplxPnC4hD/H6Hc6JOfw09ArT5v5Ql X-Gm-Gg: ASbGncu6Wv5bMacAFpIsn3sOxzGyYBWtuYepo97CHEy4kU/D7DfoF8Ofv9IUini0NOf YrKywxBnBMdoT5+0f+GtKTWxCPxXLeI/TJy47SJcXK9rXWXdoq37gcu+E4j1W8uaozx1IW9Chi7 D37RDUDgBA1rN33xEb2meKcGeH3KpKquqTzoBcFyfUqdZOu4LpXpYLW0VG8yLSCLBWLw1Vqo9g4 j+mdXJS877dGj1LX92ug109OiVMs290jWYQaqWgtxZ9njY2miNBirOPa8KN686FGcUz0CXfQghm 887laPnRDSB1v7MS3yiQEMiFWV3OKhyc6A3uieJn/EeN27bEGoPdDVtm6eedNcWCzxbSzQ3SeSU HWVehOCcEMUnDdl3RzDmKpwfG3ECe4ng10dapDMkS X-Google-Smtp-Source: AGHT+IFDqd9DGM13ekiR/1j2Hsg6xDadmLk+QaKSXMelg8CgnsJGGuOc4zecDajxQy70qAdaM+QB4Q== X-Received: by 2002:a17:907:da6:b0:aa6:824c:4ae5 with SMTP id a640c23a62f3a-aac345f5cfbmr5941839966b.56.1736169763991; Mon, 06 Jan 2025 05:22:43 -0800 (PST) Received: from ?IPV6:2a02:3100:ad97:900:c87:b717:6cf:e370? (dynamic-2a02-3100-ad97-0900-0c87-b717-06cf-e370.310.pool.telefonica.de. [2a02:3100:ad97:900:c87:b717:6cf:e370]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-aac0efe4971sm2279057966b.107.2025.01.06.05.22.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2025 05:22:42 -0800 (PST) Message-ID: <9579ad70-7438-4ab6-81fd-8c6c6a9faa50@gmail.com> Date: Mon, 6 Jan 2025 14:22: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 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: <79f347c6-ac14-475a-8c93-f1a4efc3e15b@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 J7mIXSPuDfeJhRDt9sGM6aRVfXbZ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bY/mENuGgWehRlTAbhC4BLTZ5uYS0YMQCR7v9UGMWdNWXFyrOB6PjSu Trn9MsPoUc8qI72mVpxEXQDLlrd2ijEWm7Nrf52YMD7hL6rXXuis7R6zY8WnnBhW0uCfhajx q+KuARXC0sDLztcjaS3ayXonpoCPZep2Bd5xqE4Ln8/COCslP7E92W1uf1EcdXXIrx1acg21 H/0Z53okMykVs3a8tECPHIxnre2UxKdTbCEkjkR4V6JyplTS47oWMw3zyI7zkaadfzVFBxk2 lo/Tny+FX1Azea3Ce7oOnRUEZtWSsUidtIjmL8YUQFZYm+JUIgfRmSpMFq8JP4VH43GXpB/S OCrl+/xujzvoUBFV/cHKjEQYBxo+MaiQa1U54ykM2W4DnHb1UiEf5xDkFd4= In-Reply-To: <79f347c6-ac14-475a-8c93-f1a4efc3e15b@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 erratum handling by calling phy_disable_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. Reported-by: Oleksij Rempel Signed-off-by: Heiner Kallweit --- v2: - call phy_disable_eee() instead of clearing supported_eee --- 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 eeb33eb18..e7eaa1264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -1524,6 +1524,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) { + phy_disable_eee(phydev); + 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 @@ -2002,12 +2008,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); } From patchwork Mon Jan 6 13:23:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 13927439 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 AF4BD1DE2D7 for ; Mon, 6 Jan 2025 13:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736169822; cv=none; b=bTTgkEBeqPDFocGXgA7zu/4c304muXfwlB8jDNVCcEZu491/xcrurv37flCsrDcp076ZfkK6PXGZTLmnLdHmE+9jRH9UwlJad4e3QtoX/k6Kb9uiinxU82zXJ5XSc6c6amZ+Zbf95BTEyMBn0cU2p31FuuNBmCHgLekDh4XSUpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736169822; c=relaxed/simple; bh=DgCr6GvFALXmKzOSq+9ZU5xCdHcnktEI1NRuQvwWINY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=TkF2zql71nAv580yWGamA/PRbh9h4jA+xzJS79/prZONqA7HfBT4OpIwW6OaUh9Qv3IBm+y7Rs7PLlUpjDc5s+emUEkQNlzZwdUwWeEWnZtwPDAWmkMLW3+GrDfm5pa1hZkgWTojl0FCxcipwbxVNf171pFu3yb0sfIQH8JuF9o= 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=biDFff8U; arc=none smtp.client-ip=209.85.218.53 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="biDFff8U" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-aaecf50578eso303184166b.2 for ; Mon, 06 Jan 2025 05:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736169819; x=1736774619; 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=xGRoTheNfm1NSY5RVYqo69FPbTVXP/c8aUnCdY0uVI0=; b=biDFff8UFUCRKRfNwqrNfDGLborYoOgrBgNutaXmygyGqn/vmkKVDiM/kbCC2EwQBn HAjkrCRERmoRXj/+CGaNlahKbpPMF4vcH+9MlBEspdNTIjBxX7r8cDySJtpbj8UO2IFu nfiIi7l3lBaQk9NWsym+I+Ak65Hf0PquryIUaULY1HMngxd26Qcio6skMwhB21+18wGq OFDn34KmjF3XPrjWXcES9zMpZSG+xarKyMexqBmM/bIp38Xaj5e1KEmRN0NSCyEUd41a Mz+CYq47pgrTgvdfrfs34aiuzLemNMw3Xm1pIkctvgPETsKCtzCZWCKXcwHeIhjg1G1B IeYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736169819; x=1736774619; 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=xGRoTheNfm1NSY5RVYqo69FPbTVXP/c8aUnCdY0uVI0=; b=dvQBNXLGAzwp7hNVfELNWbCti/DhBp5l8py6qWoZ8ccvqY3hyj1+bDIiHr1MjekzxO /pLNolEn039w/SHwDoZtQuhnPwNOXY7mAjGgJPJ2eQwZZeeG0BvldaQ+GuwKw3uhVELC CyVfu7BwvcZWPkGnRb8dcDvjU5ATaHQyb2knWKIhAyXRm8m8G1bV4G+4blJfOJEwS13Y 0QZLfgMmTSR0Avb6Q+oHMdKKwNuSikLJxBnSrct/gzw4ed1QVZdgnTTsMrprOb/aqf22 W8goSueg1BI2QELVrT9sWKrSzfC9kr5HY1OCVlqElKxC50zGw3Ga2hglNLC0dpbaeq0j b0TQ== X-Gm-Message-State: AOJu0YzM4o8kbVkaw6YbzkcAW/el4gGL+sVQGPK0Ek2UHEZV9TfBAw+Z 7rrAW+cn1KZsn+KI8Wr2zud83sagd9p0K0gxbhRnKgEYWVQx2S9X X-Gm-Gg: ASbGnctEwhKemrdXKN6LhJ6KwKL+YZs6EaDyYQsrtnMGlzoc4aGP2bClfJLcg+CijLV IoSdwaBCVRqvlM30QxNIwDTZBVM0u+HZy1nIX3lqflpPX/V3Boas10rahHVJ6BuLBSy1HfnvEPE xJCX1FH+iseAW7O2ExaT8AlbTUTkvV/3NiZFudTJk0SB0XPLnWP1/RVjakQafZpQ3qC1VgzUj7A spP88jedbYO1f3wRFN4yDUMI1S7Ob20gsoOKKZ6gCLRhC/ygieiR0NVc5pYySXQZOf/MTTxwXH+ 6T+PXHClMVQ/Jpnq0qHRVGjmjQUMahCgsOHsYiCxUqE2RqsLEtMEzGKvPS60uShStl5/qJMwxfZ pmOY89Y9b05J576tRJoMIY0v4Fol22xaw+XebDwZ+ X-Google-Smtp-Source: AGHT+IGOwqjxGzgifX8hCGwn+ExePJj83vszAD/RJhRRqC7UlgCnYxvcYLBz858ENEWyrvaYIYiPTw== X-Received: by 2002:a17:906:4fce:b0:aa6:519c:ef9a with SMTP id a640c23a62f3a-aac3366afa5mr5588271466b.53.1736169818755; Mon, 06 Jan 2025 05:23:38 -0800 (PST) Received: from ?IPV6:2a02:3100:ad97:900:c87:b717:6cf:e370? (dynamic-2a02-3100-ad97-0900-0c87-b717-06cf-e370.310.pool.telefonica.de. [2a02:3100:ad97:900:c87:b717:6cf:e370]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5d95a597faesm248498a12.52.2025.01.06.05.23.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2025 05:23:37 -0800 (PST) Message-ID: <329108a3-12d6-4ce4-9b28-b59f107120ba@gmail.com> Date: Mon, 6 Jan 2025 14:23:36 +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 2/2] net: dsa: microchip: remove MICREL_NO_EEE workaround 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: <79f347c6-ac14-475a-8c93-f1a4efc3e15b@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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Ea1uDdfZeKef/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: <79f347c6-ac14-475a-8c93-f1a4efc3e15b@gmail.com> X-Patchwork-Delegate: kuba@kernel.org The integrated PHY's on all these switch types have the same PHY ID. So we can assume that the issue is related to the PHY type, not the switch type. After having disabled EEE for this PHY type, we can remove the workaround code here. Note: On the fast ethernet models listed here the integrated PHY has PHY ID 0x00221550, which is handled by PHY driver "Micrel KSZ87XX Switch". This PHY driver doesn't handle flag MICREL_NO_EEE, therefore setting the flag for these models results in a no-op. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c | 25 ------------------------- include/linux/micrel_phy.h | 1 - 2 files changed, 26 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index e3512e324..4871bb1fc 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -3008,31 +3008,6 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port) if (!port) return MICREL_KSZ8_P1_ERRATA; break; - case KSZ8567_CHIP_ID: - /* KSZ8567R Errata DS80000752C Module 4 */ - case KSZ8765_CHIP_ID: - case KSZ8794_CHIP_ID: - case KSZ8795_CHIP_ID: - /* KSZ879x/KSZ877x/KSZ876x Errata DS80000687C Module 2 */ - case KSZ9477_CHIP_ID: - /* KSZ9477S Errata DS80000754A Module 4 */ - case KSZ9567_CHIP_ID: - /* KSZ9567S Errata DS80000756A Module 4 */ - case KSZ9896_CHIP_ID: - /* KSZ9896C Errata DS80000757A Module 3 */ - case KSZ9897_CHIP_ID: - case LAN9646_CHIP_ID: - /* KSZ9897R Errata DS80000758C Module 4 */ - /* Energy Efficient Ethernet (EEE) feature select must be manually disabled - * The EEE feature is enabled by default, but it is not fully - * operational. It must be manually disabled through register - * controls. If not disabled, the PHY ports can auto-negotiate - * to enable EEE, and this feature can cause link drops when - * linked to another device supporting EEE. - * - * The same item appears in the errata for all switches above. - */ - return MICREL_NO_EEE; } return 0; diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 591bf5b5e..9af01bdd8 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h @@ -44,7 +44,6 @@ #define MICREL_PHY_50MHZ_CLK BIT(0) #define MICREL_PHY_FXEN BIT(1) #define MICREL_KSZ8_P1_ERRATA BIT(2) -#define MICREL_NO_EEE BIT(3) #define MICREL_KSZ9021_EXTREG_CTRL 0xB #define MICREL_KSZ9021_EXTREG_DATA_WRITE 0xC