diff options
author | Evan Lojewski <github@meklort.com> | 2021-02-06 11:26:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 11:26:11 -0700 |
commit | d41199eb44665c4c0665feeeffa29a6756018af6 (patch) | |
tree | da1dd46889fb10403161fc304db27caff94ce6af | |
parent | 272239fc883f3ae1c2bc908b978a29096cc74cf9 (diff) | |
download | bcm5719-ortega-d41199eb44665c4c0665feeeffa29a6756018af6.tar.gz bcm5719-ortega-d41199eb44665c4c0665feeeffa29a6756018af6.zip |
network: Ensure the advertisement mode is updated when reloading. (#203)
-rw-r--r-- | libs/Network/ports.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libs/Network/ports.c b/libs/Network/ports.c index c446e6b..92391f5 100644 --- a/libs/Network/ports.c +++ b/libs/Network/ports.c @@ -10,7 +10,7 @@ /// //////////////////////////////////////////////////////////////////////////////// /// -/// @copyright Copyright (c) 2018-2020 Evan Lojewski +/// @copyright Copyright (c) 2018-2021 Evan Lojewski /// @cond /// /// All rights reserved. @@ -876,6 +876,20 @@ void Network_InitPort(NetworkPort_t *port, reload_type_t reset_phy) MII_reset(port->device, phy); APE_releaseLock(); } + else + { + bool updated; + + // Ensure the PHY is advertising all capabilities and updating if needed. + APE_aquireLock(); + updated = MII_UpdateAdvertisement(port->device, phy); + APE_releaseLock(); + + if (updated) + { + printf("Advert updated\n"); + } + } // 1000Mb/s mode only works if D0u is 0 when the host is off. // Note: Per ortega, this should possibly tansition between 0 and 6.25MHz depending on the power / clock states for power consumption reasons. |