FEC driver hangs hardware on i.MX6SX
Subsystems (2)
Hi Fugang,
Your commit e8fcfcd5684a (net: fec: optimize the clock management to save power) landed on mainline with v3.16-rc1. It causes a hardware hang on i.MX6SX, if the rootfs is not on NFS but something else like MMC.
I think the cause is that PTP is still accessing registers after FEC driver calls fec_enet_clk_enable(ndev, false) to disable FEC clocks. Can you please try to provide a fix for this regression soon?
Shawn
Quoted 4 lines · Shawn Guo
I think the cause is that PTP is still accessing registers after FEC driver calls
fec_enet_clk_enable(ndev, false)to disable FEC clocks. Can you please try to provide a fix for this regression soon?
What do you mean by, "PTP is still accessing registers"?
The only access to any register is through the driver, and the driver can and should make sure all register accesses are safe.
Thanks,
Richard
Quoted 10 lines · Richard Cochran
Quoted 4 lines · Shawn Guo
I think the cause is that PTP is still accessing registers after FEC driver calls
fec_enet_clk_enable(ndev, false)to disable FEC clocks. Can you please try to provide a fix for this regression soon?What do you mean by, "PTP is still accessing registers"?
The only access to any register is through the driver, and the driver can and should make sure all register accesses are safe.
Sorry for being vague, Richard. I meant PTP driver is still accessing registers.
With Fugang's clock management patch, FEC clocks will be disabled to save power after FEC gets probed. But at that point, fec_ptp driver already launches a timer, which will trigger the read on FEC ATIME register once per second.
Shawn
From: Shawn Guo <[email protected]> Data: Monday, July 21, 2014 9:59 AM
Quoted 20 lines
To: Richard Cochran
Cc: Duan Fugang-B38611; linux-arm-kernel at lists.infradead.org; netdev at vger.kernel.org; Li Frank-B20596; David S. Miller
Subject: Re: FEC driver hangs hardware on i.MX6SXQuoted 10 lines · Richard Cochran
Quoted 4 lines · Shawn Guo
I think the cause is that PTP is still accessing registers after FEC driver calls
fec_enet_clk_enable(ndev, false)to disable FEC clocks. Can you please try to provide a fix for this regression soon?What do you mean by, "PTP is still accessing registers"?
The only access to any register is through the driver, and the driver can and should make sure all register accesses are safe.
Sorry for being vague, Richard. I meant PTP driver is still accessing registers.
Quoted 6 lines
With Fugang's clock management patch, FEC clocks will be disabled to save power after FEC gets probed. But at that point,
fec_ptpdriver already launches a timer, which will trigger the read on FEC ATIME register once per second.Shawn
Yes, why does it cause at imx6sx platform ?
Because imx5x, imx6q/dl/sl enet register access don't cause system hang when clock is disab led, just return one error value that is zero. But for imx6sx, if there disable enet ipg clock, and access register, which cause system hang.
For clock management patch itself, there have no any problem. Just ptp driver has one issue which think clock is always on.
I submit one patch to fix the ptp issue.
Thanks,
Andy
Hi, Shawn,
Quoted 10 lines
-----Original Message-----
From: Shawn Guo [mailto:shawn.guo at freescale.com]
Sent: Sunday, July 20, 2014 10:58 AM
To: Duan Fugang-B38611
Cc: Li Frank-B20596; David S. Miller; Guo Shawn-R65073; netdev at vger.kernel.org; linux-arm-kernel at lists.infradead.org
Subject: FEC driver hangs hardware on i.MX6SXHi Fugang,
Quoted 8 lines
Your commit
e8fcfcd5684a(net: fec: optimize the clock management to save power) landed on mainline with v3.16-rc1. It causes a hardware hang on i.MX6SX, if the rootfs is not on NFS but something else like MMC.I think the cause is that PTP is still accessing registers after FEC driver calls
fec_enet_clk_enable(ndev, false)to disable FEC clocks. Can you please try to provide a fix for this regression soon?
Yes, you analyze is right. We had the related patch on internal trees since imx6sx bringup. I will try to move the patch to upstream.
Thanks,
Andy