From 91dd64ad25baa27954a7518e73df4fca8a2d0c93 Mon Sep 17 00:00:00 2001 From: Julian Pidancet Date: Mon, 14 Nov 2011 21:00:20 +0000 Subject: [PATCH] [rtl8139] Perform only 8-bit ioport access on the ChipCmd register 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 Signed-off-by: Michael Brown --- src/drivers/net/rtl8139.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index ebe84fb1..2da8223a 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -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 * )