On 05/24/2017 04:28 PM, Florian Fainelli wrote:

Yes phydev->lock which is used to serialize the state machine state changes.

Most PHYs have many more registers than the 15 standard exposed
directly, and so you need indirect reads/writes to access these
registers, which typically involve switching a particular page, doing
the indirect register access, and then flipping the page back. If you
interrupt that scheme one way or another, your reads and writes are all
messed up.

Ah, and the at803x is a device like that.

At worst, the autopoll feature could read a register from the wrong page, and think that the link state has changed when it hasn't. But that's still bad, and all my problems do revolve around link states.

I forgot one detail.  Every time you do an MDIO read/write, it
temporarily disables the feature.  Although, I think that's not relevant
to your point.

Is that done by the HW itself, or is this under SW control exclusively.

Software.

Reply via email to