forked from M-Labs/zynq-rs
zynq::eth: don't check_link_change if link already established
This commit is contained in:
parent
4d3b2ac7e5
commit
959bf8a245
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user