qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pcnet: Avoid warning when switching back to 16bit mode
@ 2019-03-11  7:47 Helge Deller
  2019-03-11 10:11 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2019-03-11  7:47 UTC (permalink / raw)
  To: qemu-devel, Jason Wang; +Cc: Richard Henderson

When Linux is shutting down, the pcnet32 driver switches the pcnet card
back to 16bit mode to "avoid problems with dumb DOS packet driver after
a warm reboot".
This triggers the following warning in the qemu pcnet32 emulation:
Bad SWSTYLE=0x04

Avoid this qemu warning by allowing the switch-back to 16bit mode.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index d9ba04bdfc..14eb2fa1b0 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -1496,8 +1496,9 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val)
         case 1:
             val |= 0x0100;
             break;
-        case 2:
+        case 2: /* 32bit mode */
         case 3:
+        case 4: /* 16bit mode */
             val |= 0x0300;
             break;
         default:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-11 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-11  7:47 [Qemu-devel] [PATCH] pcnet: Avoid warning when switching back to 16bit mode Helge Deller
2019-03-11 10:11 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).