]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[rtl8139] Perform only 8-bit ioport access on the ChipCmd register
authorJulian Pidancet <julian.pidancet@gmail.com>
Mon, 14 Nov 2011 21:00:20 +0000 (21:00 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 14 Nov 2011 22:23:06 +0000 (22:23 +0000)
The ChipCmd register is only an 8-bit register.  The 16-bit access
used by iPXE was causing an issue when used with qemu emulated rtl8139
device which was improperly aligning IOs.

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/rtl8139.c

index ebe84fb108db7f58c1b0619826acaeba825c786b..2da8223ae8db5afff09bd4f47537e19c7399848a 100644 (file)
@@ -434,7 +434,7 @@ static void rtl_poll ( struct net_device *netdev ) {
        }
 
        /* Handle received packets */
-       while ( ! ( inw ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
+       while ( ! ( inb ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
                rx_status = * ( ( uint16_t * )
                                ( rtl->rx.ring + rtl->rx.offset ) );
                rx_len = * ( ( uint16_t * )