The RX_STATUS register was being cleared after servicing the underlying event.
This is incorrect as if another packet is received after the service routine
(Xgmac_process_rx()) returns, then the frame-received flag for the new packet
will be cleared. U-boot will then completely miss the new packet even though
the hardware has sucessfully received it.
Fixed by clearing the RX_STATUS register immediately after polling.
Reported-by: Jason Wu <huanyu@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
status =
XEmacPss_ReadReg(EmacPssInstancePtr->Config.BaseAddress,
XEMACPSS_RXSR_OFFSET);
+ XEmacPss_WriteReg(EmacPssInstancePtr->Config.BaseAddress,
+ XEMACPSS_RXSR_OFFSET, status);
if (status & XEMACPSS_RXSR_FRAMERX_MASK) {
// printf("rx packet received\n");
} while (retval == 0) ;
}
- /* Clear interrupt status.
- */
- XEmacPss_WriteReg(EmacPssInstancePtr->Config.BaseAddress,
- XEMACPSS_RXSR_OFFSET, status);
-
return 1;
}