Skip to content

Commit 91dd64a

Browse files
Julian Pidancetmcb30
Julian Pidancet
authored andcommittedNov 14, 2011
[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>
1 parent caf98cf commit 91dd64a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/drivers/net/rtl8139.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static void rtl_poll ( struct net_device *netdev ) {
434434
}
435435

436436
/* Handle received packets */
437-
while ( ! ( inw ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
437+
while ( ! ( inb ( rtl->ioaddr + ChipCmd ) & RxBufEmpty ) ) {
438438
rx_status = * ( ( uint16_t * )
439439
( rtl->rx.ring + rtl->rx.offset ) );
440440
rx_len = * ( ( uint16_t * )

0 commit comments

Comments
 (0)