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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 B61E3ECE587 for ; Tue, 1 Oct 2019 16:59:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 844C12168B for ; Tue, 1 Oct 2019 16:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569949188; bh=+/GPWSjFANCOmijUlq3Ycvx8UhI7FFqWIqqYSVoJUU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=UpdgrstXTFnA+pvYQvuZHovJSR33CTUdOsdnLuXbuhOrH0dhDtXHrGlGhKF1po46u 2Rz4LROt0Rxtbg//V1PVv/ilF/VQfhXtTxNF1gWGSFPAHzw/3npSIKNjagwb5ZBoRc UjkFGZgSTEpQ1AXDX8iDpBqt62TI2YOL3oij1xds= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730629AbfJAQlG (ORCPT ); Tue, 1 Oct 2019 12:41:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:52592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730601AbfJAQlG (ORCPT ); Tue, 1 Oct 2019 12:41:06 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 99A0421872; Tue, 1 Oct 2019 16:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569948065; bh=+/GPWSjFANCOmijUlq3Ycvx8UhI7FFqWIqqYSVoJUU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CtONktcpgG7bHkRp8X8RUnfTlA9s6m3vgxNBnCLrO3JhcpZrELxsOOn1KRZu6QATW dewQzkPFP8ingcCIVITfjLXcXdgNE+CCcujQP8KHeBankE5hQGhaLxUCEMbigTDuhv ht/CaBpBGHGj4Sn7Jjk3sLQ5WH854GjSEirMnxHE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans Andersson , Andrew Lunn , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.3 62/71] net: phy: micrel: add Asym Pause workaround for KSZ9021 Date: Tue, 1 Oct 2019 12:39:12 -0400 Message-Id: <20191001163922.14735-62-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191001163922.14735-1-sashal@kernel.org> References: <20191001163922.14735-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hans Andersson [ Upstream commit 407d8098cb1ab338199f4753162799a488d87d23 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 3c8186f269f9e..2fea5541c35a8 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.20.1