Browse Source

[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>
tags/v1.20.1
Julian Pidancet 13 years ago
parent
commit
91dd64ad25
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/drivers/net/rtl8139.c

+ 1
- 1
src/drivers/net/rtl8139.c View File

@@ -434,7 +434,7 @@ static void rtl_poll ( struct net_device *netdev ) {
434 434
 	}
435 435
 
436 436
 	/* Handle received packets */
437
-	while ( ! ( inw ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
437
+	while ( ! ( inb ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
438 438
 		rx_status = * ( ( uint16_t * )
439 439
 				( rtl->rx.ring + rtl->rx.offset ) );
440 440
 		rx_len = * ( ( uint16_t * )

Loading…
Cancel
Save