Skip to content

Commit

Permalink
[rtl8139] Perform only 8-bit ioport access on the ChipCmd register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julian Pidancet authored and mcb30 committed Nov 14, 2011
1 parent caf98cf commit 91dd64a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/net/rtl8139.c
Expand Up @@ -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 * )
Expand Down

0 comments on commit 91dd64a

Please sign in to comment.