summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulian Pidancet2011-11-14 22:00:20 +0100
committerMichael Brown2011-11-14 23:23:06 +0100
commit91dd64ad25baa27954a7518e73df4fca8a2d0c93 (patch)
tree0ff39d56c9534d5fad4715d1171f34c10cc17da5 /src
parent[pxe] Improve pxe_preboot debugging messages (diff)
downloadipxe-91dd64ad25baa27954a7518e73df4fca8a2d0c93.tar.gz
ipxe-91dd64ad25baa27954a7518e73df4fca8a2d0c93.tar.xz
ipxe-91dd64ad25baa27954a7518e73df4fca8a2d0c93.zip
[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 <julian.pidancet@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/rtl8139.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c
index ebe84fb10..2da8223ae 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 * )