All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org
Cc: Hans <sungdgdhtryrt@gmail.com>, Jason Wang <jasowang@redhat.com>
Subject: [PULL 1/8] rtl8139: Fix behaviour for old kernels.
Date: Fri,  2 Aug 2024 11:19:22 +0800	[thread overview]
Message-ID: <20240802031929.44060-2-jasowang@redhat.com> (raw)
In-Reply-To: <20240802031929.44060-1-jasowang@redhat.com>

From: Hans <sungdgdhtryrt@gmail.com>

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>
---
 hw/net/rtl8139.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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);
-- 
2.42.0



  reply	other threads:[~2024-08-02  3:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  3:19 [PULL 0/8] Net patches Jason Wang
2024-08-02  3:19 ` Jason Wang [this message]
2024-08-02  3:19 ` [PULL 2/8] virtio-net: Ensure queue index fits with RSS Jason Wang
2024-08-06 13:30   ` Daniel P. Berrangé
2024-08-02  3:19 ` [PULL 3/8] virtio-net: Fix network stall at the host side waiting for kick Jason Wang
2024-08-02  3:19 ` [PULL 4/8] net: update netdev stream/dgram man page Jason Wang
2024-08-02  3:19 ` [PULL 5/8] net: update netdev stream man page with unix socket Jason Wang
2024-08-02  3:19 ` [PULL 6/8] net: update netdev dgram " Jason Wang
2024-08-02  3:19 ` [PULL 7/8] net: update netdev stream man page with the reconnect parameter Jason Wang
2024-08-02  3:19 ` [PULL 8/8] net: Reinstate '-net nic, model=help' output as documented in man page Jason Wang
2024-08-02  9:48 ` [PULL 0/8] Net patches Richard Henderson
2024-08-05  2:38   ` Jason Wang
2024-08-05 22:00     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240802031929.44060-2-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sungdgdhtryrt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.