aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans <sungdgdhtryrt@gmail.com>2024-05-11 22:11:36 +0200
committerJason Wang <jasowang@redhat.com>2024-08-02 11:04:03 +0800
commit9e3b9f27658cce308b7f71b19a4ec31749575414 (patch)
tree7a1ebb81afc9beee57614d064015e8bd4e6c4457
parent31669121a01a14732f57c49400bc239cf9fd505f (diff)
rtl8139: Fix behaviour for old kernels.
Old linux kernel rtl8139 drivers (ex. debian 2.1) uses outb to set the rx mode for RxConfig. Unfortunatelly qemu does not support outb for RxConfig. Signed-off-by: Hans <sungdgdhtryrt@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r--hw/net/rtl8139.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 897c86ec41..03a204ef8a 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -2738,7 +2738,11 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val)
}
break;
-
+ case RxConfig:
+ DPRINTF("RxConfig write(b) val=0x%02x\n", val);
+ rtl8139_RxConfig_write(s,
+ (rtl8139_RxConfig_read(s) & 0xFFFFFF00) | val);
+ break;
default:
DPRINTF("not implemented write(b) addr=0x%x val=0x%02x\n", addr,
val);