forked from M-Labs/artiq
parent
1f82ceaa85
commit
80cbef0031
|
@ -158,11 +158,8 @@ fn network_boot() {
|
||||||
|
|
||||||
println!("Using MAC address {} and IP address {}", eth_addr, ip_addr);
|
println!("Using MAC address {} and IP address {}", eth_addr, ip_addr);
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
|
||||||
let mut net_device = unsafe { ethmac::EthernetDevice::new() };
|
let mut net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||||
|
net_device.reset_phy_if_any();
|
||||||
#[cfg(has_ethphy)]
|
|
||||||
net_device.reset_phy();
|
|
||||||
|
|
||||||
let mut neighbor_map = [None; 2];
|
let mut neighbor_map = [None; 2];
|
||||||
let neighbor_cache =
|
let neighbor_cache =
|
||||||
|
|
|
@ -57,6 +57,11 @@ impl EthernetDevice {
|
||||||
clock::spin_us(2_000);
|
clock::spin_us(2_000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn reset_phy_if_any(&mut self) {
|
||||||
|
#[cfg(has_ethphy)]
|
||||||
|
self.reset_phy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Device<'a> for EthernetDevice {
|
impl<'a> Device<'a> for EthernetDevice {
|
||||||
|
|
|
@ -150,7 +150,8 @@ fn startup_ethernet() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let net_device = unsafe { ethmac::EthernetDevice::new() };
|
let mut net_device = unsafe { ethmac::EthernetDevice::new() };
|
||||||
|
net_device.reset_phy_if_any();
|
||||||
|
|
||||||
// fn _net_trace_writer<U>(timestamp: u64, printer: smoltcp::wire::PrettyPrinter<U>)
|
// fn _net_trace_writer<U>(timestamp: u64, printer: smoltcp::wire::PrettyPrinter<U>)
|
||||||
// where U: smoltcp::wire::pretty_print::PrettyPrint {
|
// where U: smoltcp::wire::pretty_print::PrettyPrint {
|
||||||
|
|
Loading…
Reference in New Issue