eth: doc
This commit is contained in:
parent
b4bcc6cf5c
commit
b33ccf83ba
|
@ -81,6 +81,8 @@ impl DescList {
|
|||
entry.word1.write(
|
||||
DescWord1::zeroed()
|
||||
);
|
||||
// Flush buffer from cache, to be filled by the peripheral
|
||||
// before next read
|
||||
dcci_slice(&buffer[..]);
|
||||
}
|
||||
|
||||
|
@ -129,6 +131,8 @@ pub struct PktRef<'a> {
|
|||
|
||||
impl<'a> Drop for PktRef<'a> {
|
||||
fn drop(&mut self) {
|
||||
// Flush buffer from cache, to be filled by the peripheral
|
||||
// before next read
|
||||
dcci_slice(self.buffer);
|
||||
|
||||
self.entry.word0.modify(|_, w| w.used(false));
|
||||
|
|
|
@ -124,12 +124,13 @@ pub struct PktRef<'a> {
|
|||
|
||||
impl<'a> Drop for PktRef<'a> {
|
||||
fn drop(&mut self) {
|
||||
// Write back all dirty cachelines of this buffer
|
||||
dcc_slice(self.buffer);
|
||||
|
||||
self.entry.word1.modify(|_, w| w.used(false));
|
||||
if ! self.regs.tx_status.read().tx_go() {
|
||||
self.regs.net_ctrl.modify(|_, w|
|
||||
w.start_tx(true)
|
||||
);
|
||||
// Start TX if not already running
|
||||
self.regs.net_ctrl.modify(|_, w| w.start_tx(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue