Some users such as fs/nfs.c just save the pointer to the packet in the handler and process it after net_poll() returns. This break when more than one packet is received using the same buffer. Signed-off-by: Michael Olbrich <m.olbrich@xxxxxxxxxxxxxx> --- drivers/net/dm9k.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/dm9k.c b/drivers/net/dm9k.c index e98b8f4..3a4c6aa 100644 --- a/drivers/net/dm9k.c +++ b/drivers/net/dm9k.c @@ -541,7 +541,6 @@ static int dm9k_check_for_rx_packet(struct dm9k *priv) return 0; /* no packet */ dev_dbg(dev, "Packet present\n"); - dm9k_iow(priv, DM9K_ISR, ISR_PR); /* clear PR status latched in bit 0 */ return 1; /* packet present */ } @@ -587,8 +586,10 @@ static int dm9k_eth_rx(struct eth_device *edev) return 0; /* no data present */ do { - if (!dm9k_validate_entry(priv)) + if (!dm9k_validate_entry(priv)) { + dm9k_iow(priv, DM9K_ISR, ISR_PR); /* clear PR status latched in bit 0 */ return 0; + } /* assume this packet is valid */ p_valid = true; @@ -634,6 +635,7 @@ static int dm9k_eth_rx(struct eth_device *edev) dm9k_rd(priv->buswidth, priv->iodata, priv->pckt, rx_len); dev_dbg(dev, "passing %u bytes packet to upper layer\n", rx_len); net_receive(edev, priv->pckt, rx_len); + return 0; } else { dev_dbg(dev, "Discarding packet\n"); dm9k_dump(priv->buswidth, priv->iodata, rx_len); /* discard packet */ -- 2.0.0.rc0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox