Re: [PATCH net] net: bcmgenet: Fix EEE implementation

From: Florian Fainelli
Date: Tue Jun 06 2023 - 18:16:32 EST


On 6/6/23 15:02, Russell King (Oracle) wrote:
On Tue, Jun 06, 2023 at 02:43:47PM -0700, Florian Fainelli wrote:
We had a number of short comings:

- EEE must be re-evaluated whenever the state machine detects a link
change as wight be switching from a link partner with EEE
enabled/disabled

- tx_lpi_enabled controls whether EEE should be enabled/disabled for the
transmit path, which applies to the TBUF block

- We do not need to forcibly enable EEE upon system resume, as the PHY
state machine will trigger a link event that will do that, too

Fixes: 6ef398ea60d9 ("net: bcmgenet: add EEE support")
Signed-off-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
---
netdev maintainers, please do not apply without Andrew, Russell and
Oleksij reviewing first since this relates to the on-going EEE rework
from Andrew.

Hi Florian,

Please could you include some information on the UMAC_EEE_CTRL EEE_EN
bit - is this like the main switch for EEE which needs to be set
along with the bits in the tbuf register for the transmit side to
signal LPI?

EEE_EN is described as:

If set, the TX LPI policy control engine is enabled and the MAC inserts LPI_idle codes if the link is idle. The rx_lpi_detect assertion is independent of this configuration.

in the RBUF, EEE_EN is described as:

1: to enable Energy Efficient feature between Unimac and PHY for Rx Path

and in the TBUF, EEE_EN is described as:

1: to enable Energy Efficient feature between Unimac and PHY for Tx Path

The documentation is unfortunately scare about how these two signals connect :/
--
Florian

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature