Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1895302ybn; Thu, 26 Sep 2019 03:58:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVw8PFXMtfGHYTii2xUIPtpefRz+exiCnSMTQvrzBG1K9j4AUiEk6VIrbTA+gNXXHkIkWD X-Received: by 2002:a17:906:258f:: with SMTP id m15mr2537836ejb.20.1569495488431; Thu, 26 Sep 2019 03:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569495488; cv=none; d=google.com; s=arc-20160816; b=k8Yl1/Tg5O4fCEF2hhNV3pRZpO5sA5zhSpxIRDihIlkwBaRuchQrkBpSIkFMqCeOqk nMon33AZsXCSF8vcpdGFojrIdgbqjbofTDDCaVfKS0FB2HbRtk47QUBQ+WUOeI2j0wc5 EwUQFEDukrRVm31SiRXANx40BwQ1gU3hgSbTknLnAubRNmxmCYLmAb5LFTJnA1yLT9w4 92Wqbg1RG7QnFwmicDcQGIT9YW8HGFBN3Y+KhWlzvGBsOXMgQ/p7oCI5o/O9nU9n+MY9 Z2WDxeCue4DVZH4nmN5l9xfC+x+Vms06zt1NT0/ucBTm53K9ajl4TjNJ3DV4p9kFk6jl 5SeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=M42ZqtyS4X2VTJeQGvtyaeE4lGZVCAyNa3nXEbPpw1s=; b=eTYBugdQe7VR3pd+7Sh8AtSjEc3c3ci3q4Q5fBo55IunkPaS1Pbpb/Stnbpu/JMWLQ V+RdFERu2zl1eY7BmlBjIkPU6/sLv5Rli7qeRPDJUmA78LGSi9O8wsJwfbEc3lVh3UR5 tIXAvIsB6j5tyfK8jasEZRSORaLiRUWhOAD7hkhFyKqGxy96WUYihAN38t0QHHlpjaDR IiTEvoXl1vAZNa9Uzaoi3opN1n5sCZxgN0hVmSNZa6Owm35CzSj/dPbLiddlZWqMLO6E CQGW1LPtkr2W6YIIq8FtyVJlT2i3vFG2Hb/aq46zMxaQH1frm/TkaONWVJxgzBr0Eeoe Z/dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si763370ejc.361.2019.09.26.03.57.44; Thu, 26 Sep 2019 03:58:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728922AbfIZIKT (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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