Re: [PATCH 12/13] gianfar: Add flags for magic packet and MDIO.
From: Andy Fleming <hidden>
Date: 2007-05-07 21:56:27
On May 7, 2007, at 16:31, Scott Wood wrote:
Andy Fleming wrote:quoted
On May 7, 2007, at 14:54, Scott Wood wrote:quoted
TSEC1 contains the MDIO registers for both TSEC1 and TSEC2. Thus, TSEC1 cannot be put to sleep if TSEC2 is active (plus, the phy timer would have to be deactivated). For now, the simple approach of never sleeping TSEC1 is used.The PHY timer is part of the PHY Lib. The PHY Lib has infrastructure to support suspend/resume. Any thoughts on using that? More in an another email.If the MDIO registers had their own clock disable bit, then sure. They don't.
Well, I'm getting into that in my gianfar.c review. Obviously that would be ideal, but we code with the hardware we have. :) Mostly this was referring to the comment about phy_timer needing to be deactivated.
As for the phy timer issue, it seems that phy_stop() doesn't stop the timer, which is probably a bug.
Nope. phy_timer is used to manage the state_machine of the PHY. phy_stop sets the state to HALTED, which means the PHY doesn't register any changes. But it keeps running so that phy_start can bring it back online. If you want to bring down an interface, you want phy_disconnect. That stops the timer. Andy