From: Michael Brown Date: Sat, 12 Mar 2011 12:48:29 +0000 (+0000) Subject: [eepro100] Do not discard short packets X-Git-Tag: v1.20.1~2249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c315ae039424ad53c0a6c01c93eb0444ab8bfb37;p=thirdparty%2Fipxe.git [eepro100] Do not discard short packets In a virtual environment such as qemu, we can legitimately receive packets less than 64 bytes in length, such as ARP replies. These are currently discarded, causing most IPv4 communication to fail. Fix by ignoring the RFDShort bit when receiving packets. Reported-by: Alex Williamson Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index 50214eccd..85840cdfa 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -808,7 +808,7 @@ static void ifec_rx_process ( struct net_device *netdev ) cur_rx ); DBGIO_HD ( (void*)rfd->packet, 0x30 ); - if ( ( status & RFD_STATUS ) != RFD_OK ) { + if ( ( status & ( RFD_STATUS & ~RFDShort ) ) != RFD_OK ) { DBG ( "Corrupted packet received. " "Status = %#08hx\n", status ); netdev_rx_err ( netdev, iob, -EINVAL );