summaryrefslogtreecommitdiffstats
path: root/libs/Network
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2020-12-13 13:49:20 -0700
committerGitHub <noreply@github.com>2020-12-13 13:49:20 -0700
commit6db21a05554530b98a3b99e5f9f315bc3748a8d1 (patch)
tree0cdb1bd092e522ec2934fd55c1aabfaacef27971 /libs/Network
parent792c2cdc7dee1b36ffd3ef4f0e6a0fd852e988bd (diff)
downloadbcm5719-ortega-6db21a05554530b98a3b99e5f9f315bc3748a8d1.tar.gz
bcm5719-ortega-6db21a05554530b98a3b99e5f9f315bc3748a8d1.zip
network: Update EEE exit time based on speed per the tg3 driver. (#192)
Diffstat (limited to 'libs/Network')
-rw-r--r--libs/Network/ports.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/Network/ports.c b/libs/Network/ports.c
index 877d3ec..cf144bc 100644
--- a/libs/Network/ports.c
+++ b/libs/Network/ports.c
@@ -1120,6 +1120,19 @@ bool Network_updatePortState(NetworkPort_t *port)
txMacLengths.bits.IPGCRSLength = 0x2;
}
port->device->TransmitMacLengths = txMacLengths;
+
+ // Update EEE Control
+ RegDEVICEEeeControl_t eeectrl;
+ eeectrl.r32 = 0;
+ if (emacMode.bits.PortMode == DEVICE_EMAC_MODE_PORT_MODE_1000)
+ {
+ eeectrl.bits.ExitTime = DEVICE_EEE_CONTROL_EXIT_TIME_16_5_US;
+ }
+ else
+ {
+ eeectrl.bits.ExitTime = DEVICE_EEE_CONTROL_EXIT_TIME_36_US;
+ }
+ port->device->EeeControl.r32 = eeectrl.r32;
}
updated = true;
OpenPOWER on IntegriCloud