[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB679540FF95A7B05931830A30E6749@DB8PR04MB6795.eurprd04.prod.outlook.com>
Date: Thu, 8 Apr 2021 05:45:11 +0000
From: Joakim Zhang <qiangqing.zhang@....com>
To: Heiner Kallweit <hkallweit1@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Fugang Duan <fugang.duan@....com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next 2/3] net: fec: use mac-managed PHY PM
> -----Original Message-----
> From: Heiner Kallweit <hkallweit1@...il.com>
> Sent: 2021年4月7日 23:53
> To: Andrew Lunn <andrew@...n.ch>; Russell King - ARM Linux
> <linux@...linux.org.uk>; Jakub Kicinski <kuba@...nel.org>; David Miller
> <davem@...emloft.net>; Fugang Duan <fugang.duan@....com>
> Cc: netdev@...r.kernel.org; Joakim Zhang <qiangqing.zhang@....com>
> Subject: [PATCH net-next 2/3] net: fec: use mac-managed PHY PM
>
> 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 <qiangqing.zhang@....com>
> Tested-by: Joakim Zhang <qiangqing.zhang@....com>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
> 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 3db882322..70aea9c27 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);
For now, I think we doesn't need to re-initialize PHY after MAC resume back, it also can be done by PHY driver if it needed.
Best Regards,
Joakim Zhang
> phy_start(ndev->phydev);
> }
> rtnl_unlock();
> --
> 2.31.1
>
Powered by blists - more mailing lists