From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B8C5C432C2 for ; Thu, 26 Sep 2019 08:10:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C1AA222BE for ; Thu, 26 Sep 2019 08:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728916AbfIZIKT (ORCPT ); Thu, 26 Sep 2019 04:10:19 -0400 Received: from smtp.cellavision.se ([84.19.140.14]:17136 "EHLO smtp.cellavision.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727963AbfIZIKT (ORCPT ); Thu, 26 Sep 2019 04:10:19 -0400 X-Greylist: delayed 906 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Sep 2019 04:10:19 EDT Received: from DRCELLEX03.cellavision.se (172.16.169.12) by DRCELLEX03.cellavision.se (172.16.169.12) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 26 Sep 2019 09:55:10 +0200 Received: from ITG-CEL-24768.cellavision.se (10.230.0.148) by DRCELLEX03.cellavision.se (172.16.169.12) with Microsoft SMTP Server id 15.0.1044.25 via Frontend Transport; Thu, 26 Sep 2019 09:55:10 +0200 From: Hans Andersson To: CC: , , , , , , Hans Andersson Subject: [PATCH] net: phy: micrel: add Asym Pause workaround for KSZ9021 Date: Thu, 26 Sep 2019 09:54:37 +0200 Message-ID: <20190926075437.18088-1-haan@cellavision.se> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hans Andersson The Micrel KSZ9031 PHY may fail to establish a link when the Asymmetric Pause capability is set. This issue is described in a Silicon Errata (DS80000691D or DS80000692D), which advises to always disable the capability. Micrel KSZ9021 has no errata, but has the same issue with Asymmetric Pause. This patch apply the same workaround as the one for KSZ9031. Signed-off-by: Hans Andersson --- drivers/net/phy/micrel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 3c8186f..2fea554 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -763,6 +763,8 @@ static int ksz9031_get_features(struct phy_device *phydev) * Whenever the device's Asymmetric Pause capability is set to 1, * link-up may fail after a link-up to link-down transition. * + * The Errata Sheet is for ksz9031, but ksz9021 has the same issue + * * Workaround: * Do not enable the Asymmetric Pause capability bit. */ @@ -1076,6 +1078,7 @@ static struct phy_driver ksphy_driver[] = { /* PHY_GBIT_FEATURES */ .driver_data = &ksz9021_type, .probe = kszphy_probe, + .get_features = ksz9031_get_features, .config_init = ksz9021_config_init, .ack_interrupt = kszphy_ack_interrupt, .config_intr = kszphy_config_intr, -- 2.17.1