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, URIBL_BLOCKED,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 ECED0C4360C for ; Fri, 27 Sep 2019 07:58:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCDCE2075D for ; Fri, 27 Sep 2019 07:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726492AbfI0H6y (ORCPT ); Fri, 27 Sep 2019 03:58:54 -0400 Received: from smtp.cellavision.se ([84.19.140.14]:34725 "EHLO smtp.cellavision.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfI0H6x (ORCPT ); Fri, 27 Sep 2019 03:58:53 -0400 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; Fri, 27 Sep 2019 09:58:50 +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; Fri, 27 Sep 2019 09:58:50 +0200 From: Hans Andersson To: CC: , , , , , , Hans Andersson Subject: [PATCH v2] net: phy: micrel: add Asym Pause workaround for KSZ9021 Date: Fri, 27 Sep 2019 09:58:02 +0200 Message-ID: <20190927075802.10376-1-haan@cellavision.se> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190926120922.GD1864@lunn.ch> References: <20190926120922.GD1864@lunn.ch> 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. Fixes: 3aed3e2a143c ("net: phy: micrel: add Asym Pause workaround") Signed-off-by: Hans Andersson Reviewed-by: Andrew Lunn --- 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 3c8186f269f9..2fea5541c35a 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.21.0.windows.1