Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2966870pxj; Mon, 17 May 2021 14:21:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypxi+bFHKFGhSAmYjFqko/gSZi0EHu/U9XbzGhy0kPA7VdZirzBQOWMdfXZybbLD+4tlWA X-Received: by 2002:a02:630e:: with SMTP id j14mr1940872jac.115.1621286489254; Mon, 17 May 2021 14:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621286489; cv=none; d=google.com; s=arc-20160816; b=fmQajN2SNIJYwpznmvWJ2kujzumMLND3DEe4wESzrC9gvTWAw1qwF0eGUICq9tCVLe 1pTUt81fmbz2R105P+Cz1ct6kbGwbbUMeqGrqePfsyRhfF9UzweS74jobJMkLuNWU0Lo vkjanaa0X4ch1JygIKq3iqus+6rzlQuFwHOIRXMLYF7dAGFKDWNRIuCF5DOvokjR28+L zWVY1rOyKCqEg6FnKR5aMQdBAFQOayjplK0lRoM3KpSMjrg3Q64JKgGz9tDuxddaHlHQ HlK9xpLUQqamgTY/5xyo1FJ07K0YGxtNnge9Ln2UQt1kJiOm7ZyOwRj3r65tq4tUvBmW av5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Rh5OfgtEdiScWac7rrsDcqGsRYNkFE0TTGN+eXIJJqo=; b=lYccRupY9nII1LYPQ0plH/Q/4DVFKWDl1aeLXfWGNGRUY6MVmEsgl1dH42sPpqyHFU zWAO2+urD02u4w63yI+sIan8or+vZoXSJwqsUC+udyxhjArlrhPJ691QGxg5HHvsw8lA AHmTKL+CSmrq66hqj7OO6xZCrVXge0z8+frBxQ0MN6op5FiOoImk9yDmziocKDsLdzFT jx47H5qtFUl5RIX6+OcwUQahTqgwWklJQyVhob+x1xXWVQkTCcg9HvcVbtPlKrjMv3Mx jQhMrS2rsk9N9wiumNVJp92xKrSHv6sUyk8ewemQ+FCoWfSXC5MWdh0jSBYGIjqzHXfy T/IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1As1900R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si3392681ios.29.2021.05.17.14.21.16; Mon, 17 May 2021 14:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1As1900R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238502AbhEQOLB (ORCPT + 99 others); Mon, 17 May 2021 10:11:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:60494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238126AbhEQOIQ (ORCPT ); Mon, 17 May 2021 10:08:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A06D460720; Mon, 17 May 2021 14:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260394; bh=X3FQxJdww4G9BL4nHozkNPwQLtFFvOmKCWJyeQ5Rj5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1As1900R37PuqTzAVVBVRZ2Wg+NZT4G3KIc0idtTDxalvFN6WqT+aYgh29MqczK3o 8DdUAy6oG6Iu+L7vDFZ5mtLf0VXp8p3r4k5jPcxRl4E1V4QF/ZPmbpUY3Xcpj8HzxU aH/YZF20a8mUCJoIQiaIqoHD+ebV/HbPY7RgUuNA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joakim Zhang , Heiner Kallweit , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.12 060/363] net: fec: use mac-managed PHY PM Date: Mon, 17 May 2021 15:58:46 +0200 Message-Id: <20210517140304.641672342@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heiner Kallweit [ Upstream commit 557d5dc83f6831b4e54d141e9b121850406f9a60 ] Use the new mac_managed_pm flag to work around an issue with KSZ8081 PHY that becomes unstable when a soft reset is triggered during aneg. Reported-by: Joakim Zhang Tested-by: Joakim Zhang Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fec_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3db882322b2b..70aea9c274fe 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2048,6 +2048,8 @@ static int fec_enet_mii_probe(struct net_device *ndev) fep->link = 0; fep->full_duplex = 0; + phy_dev->mac_managed_pm = 1; + phy_attached_info(phy_dev); return 0; @@ -3864,6 +3866,7 @@ static int __maybe_unused fec_resume(struct device *dev) netif_device_attach(ndev); netif_tx_unlock_bh(ndev); napi_enable(&fep->napi); + phy_init_hw(ndev->phydev); phy_start(ndev->phydev); } rtnl_unlock(); -- 2.30.2