Commit 263999fc authored by Adam Wujek's avatar Adam Wujek

dev/minic: don't check OOB if MINIC_RX_FIFO_EMPTY is set

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 249b49fe
......@@ -138,7 +138,7 @@ int minic_rx_frame(struct wr_minic *nic, struct wr_ethhdr *hdr,
pp_printf("RX@%x:", (unsigned)nic->base);
#endif
do {
while (1) {
unsigned rx;
rx = minic_readl(nic, MINIC_REG_RX_FIFO);
......@@ -152,6 +152,9 @@ int minic_rx_frame(struct wr_minic *nic, struct wr_ethhdr *hdr,
rx_data = MINIC_RX_FIFO_DAT_R(rx);
rx_empty = (rx & MINIC_RX_FIFO_EMPTY);
if (rx_empty)
break;
if (rx_type == WRF_DATA && hdr_size < ETH_HEADER_SIZE) {
/* reading header */
ptr16_hdr[hdr_size>>1] = htons(rx_data);
......@@ -195,7 +198,7 @@ int minic_rx_frame(struct wr_minic *nic, struct wr_ethhdr *hdr,
oob_cnt++;
}
} while (!rx_empty);
}
#ifdef RX_DUMP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment