We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ebd930 commit b736c91Copy full SHA for b736c91
1 file changed
src/drivers/e1000.cpp
@@ -216,6 +216,8 @@ void e1000::event_handler()
216
217
void e1000::recv_handler()
218
{
219
+ uint16_t old_idx = 0xffff;
220
+
221
while (rx.desc[rx.current].status & 1)
222
223
auto& tk = rx.desc[rx.current];
@@ -229,10 +231,11 @@ void e1000::recv_handler()
229
231
tk.addr = (uint64_t) this->new_rx_packet();
230
232
tk.status = 0;
233
// go to next index
- uint16_t old_idx = rx.current;
234
+ old_idx = rx.current;
235
rx.current = (rx.current + 1) % NUM_RX_DESC;
- write_cmd(REG_RXDESCTAIL, old_idx);
236
}
237
+ if (old_idx != 0xffff)
238
+ write_cmd(REG_RXDESCTAIL, old_idx);
239
240
241
void e1000::transmit(net::Packet_ptr pckt)
0 commit comments