zynq::eth: don't check_link_change if link already established

master
Astro 2019-11-11 00:08:05 +01:00
parent 4d3b2ac7e5
commit 959bf8a245
1 changed files with 6 additions and 0 deletions

View File

@ -507,6 +507,12 @@ impl<'r> EthInner<'r> {
fn check_link_change(&mut self, phy: &Phy) { fn check_link_change(&mut self, phy: &Phy) {
// As the PHY access takes some time, exit early if there was
// already a link. TODO: check once per second.
if self.link.is_some() {
return
}
let link = phy.get_link(self); let link = phy.get_link(self);
// Check link state transition // Check link state transition