From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NITIs-00040U-1k for qemu-devel@nongnu.org; Wed, 09 Dec 2009 15:38:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NITIm-0003zD-S5 for qemu-devel@nongnu.org; Wed, 09 Dec 2009 15:38:28 -0500 Received: from [199.232.76.173] (port=36371 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NITIm-0003zA-Jp for qemu-devel@nongnu.org; Wed, 09 Dec 2009 15:38:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44431) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NITIm-0002p4-3S for qemu-devel@nongnu.org; Wed, 09 Dec 2009 15:38:24 -0500 Date: Wed, 9 Dec 2009 22:35:37 +0200 From: "Michael S. Tsirkin" Message-ID: <20091209203537.GA7836@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] e1000: fix init values for command register List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Luiz Capitulino , qemu-devel@nongnu.org Command register for e1000 was initialized to values out of spec: all of bus master, io, memory and interrupt disable bits were set. This breaks the device now that we actually respect the interrupt disable bit, unless the guest happens to clear it. Fix, and make the device more spec compliant, by not touching the default. There are implications for migration from old qemu as well, will be addressed separately. Reported-by: Luiz Capitulino Tested-by: Luiz Capitulino Signed-off-by: Michael S. Tsirkin --- hw/e1000.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index 8566fe3..ad7a267 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1089,7 +1089,6 @@ static int pci_e1000_init(PCIDevice *pci_dev) pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, E1000_DEVID); - *(uint16_t *)(pci_conf+0x04) = cpu_to_le16(0x0407); *(uint16_t *)(pci_conf+0x06) = cpu_to_le16(0x0010); pci_conf[0x08] = 0x03; pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET); -- 1.6.6.rc1.43.gf55cc