Просмотр исходного кода

[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 12 лет назад
Родитель
Сommit
91dd64ad25
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      src/drivers/net/rtl8139.c

+ 1
- 1
src/drivers/net/rtl8139.c Просмотреть файл

@@ -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 * )

Загрузка…
Отмена
Сохранить