From patchwork Mon Mar 11 07:47:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 10846859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EDD6F17DF for ; Mon, 11 Mar 2019 08:05:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0A8128E37 for ; Mon, 11 Mar 2019 08:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C45F028F32; Mon, 11 Mar 2019 08:05:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BDE4F28E37 for ; Mon, 11 Mar 2019 08:05:28 +0000 (UTC) Received: from localhost ([127.0.0.1]:56950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Fw7-0003Gs-SN for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 Mar 2019 04:05:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Fsl-0000QK-47 for qemu-devel@nongnu.org; Mon, 11 Mar 2019 04:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3FfE-0004DT-Kn for qemu-devel@nongnu.org; Mon, 11 Mar 2019 03:48:01 -0400 Received: from mout.gmx.net ([212.227.15.19]:42837) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3FfE-0004Cr-Ac for qemu-devel@nongnu.org; Mon, 11 Mar 2019 03:48:00 -0400 Received: from ls3530.dellerweb.de ([92.116.128.208]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LtrKX-1gtsB52Opx-0118pa; Mon, 11 Mar 2019 08:47:54 +0100 Date: Mon, 11 Mar 2019 08:47:52 +0100 From: Helge Deller To: qemu-devel@nongnu.org, Jason Wang Message-ID: <20190311074752.GA17747@ls3530.dellerweb.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.11.3 (2019-02-01) X-Provags-ID: V03:K1:5Ov1w+Z+XHWX3UUxUGT4EU7TVZv4pLEY4r82f/zlcZE+W2RK76e MzxBQKcfqSoz8uIG+81e13P4GAcmrrsSqeJMkeTivXqKjlE8e/9OjzB5F9b67zPkQ0XpRp2 Hl15wScQ+AIvPa0Kz6xgeliMEEvPniVC8ZjAjat8XjSwi8cCEa5Gz5A5EhNSHKBXzyE6KAX caDwvWac4iIE6OOwfcEZA== X-UI-Out-Filterresults: notjunk:1;V03:K0:SXBU3RaTllw=:ndTiV56QNogi4GsXFDcqqF wAN4V0qr1tDoNjRQc6mqYNysaPpJO9HjuTMpAwagB7fX2KdRVMEcUXOpmz/G4tEj0zfcIg9Gz TIaFiSjgpIjqzDxle/W66w72nEAdEYgs7ciNHzLHNfm22USpfPL7B0BffX2wav7FmZ1JbsEGV riKEeBHNjF3/uF+TjRI3JVeM+i43zMmd4Rq93nJpXpBkC/dSOtg5QuvJFXqZeRJXez8YYFbZQ 0jDLVu8Inp2HghtIlDHceExZ9r1+adjdXywYpKagCEAUgVNz0cGgHEcNjJuCSYaG0znVGoQ1Z KSAXj4Hpahpz2FQgSJbut3tqFPdl0R+0FstPIEZE84bmpU+D+KUD6TKDhYPSPWQZIYZc95EVw sIv/DwxMiGY2u708KHRYskkfvo1FZoxvS1igwBVObML51167ev0wKAFM8FETWy2huaOiEN+ci xY89wdLjSrX9hINfHVZDkLN+mCnaWjKf5Oh6QyV7vW9OjJqcVxuJxjyn3UoRUZayyUHoGRSDP XdaqX/JeE5F3Dlapj2f2gD1S6FTcLmpMKbebRX/64UF6BWIaqbI5Eqj3+h9LP9CFCSq/0H5as 6o2oKaKBcS0Wj+1avGHTRQ6v1VfOu1HakMwXLrQQcY0CN/xhc6CgWIO+wBN8jEx0Tq4v+KMkI XB0G16aIoOTxgOdqRLXS3Vm4wIidK9mn8dD9bf+uWX13EzR6EaD5R8M6ZfKhXddCG8kk04FyU RGOoHshU63W2YvpE0wcDX6wnCOj/bIPndfzMtNDYHUA7UYahglBsMyWSl9Tn8tNzABjVeZzvr r/eP408GFc61A59o8TPLXdIsC9COtBSn4j6lcIusKoI0nQhH0B94ZQPyit3z2khbIiCIfpDPh cHChokRjCQeij7ZJIZdCV6PAzvIbHkcqE1kbxMYE0wKk+rMLRl7/8hKIT3VbLU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.19 Subject: [Qemu-devel] [PATCH] pcnet: Avoid warning when switching back to 16bit mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé 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: