drivers: ethernet: eth_enc28j60: do not check PKTIF on interrupt
The enc28j60 errata sheet says: "The Receive Packet Pending Interrupt Flag (EIR.PKTIF) does not reliably/accurately report the status of pending packets." "In the Interrupt Service Routine, if it is unknown if a packet is pending and the source of the interrupt is unknown, switch to Bank 1 and check the value in EPKTCNT. If polling to see if a packet is pending, check the value in EPKTCNT." A workaround has already been implemented inside of eth_enc28j60_rx(). But checking PKTIF before calling eth_enc28j60_rx() completely defeats the purpose of the workaround. Do not check it. Moreover, clearing ENC28J60_BIT_EIR_PKTIF is useless since it is automatically cleared once all packets are read. So remove that check and clarify comment. Also please refer to the Linux driver [1]. [1] https://elixir.bootlin.com/linux/v6.11.2/source/drivers/net/ethernet/microchip/enc28j60.c#L1090 Signed-off-by:Xavier Ruppen <xruppen@gmail.com>
Loading
Please sign in to comment