]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
e1000: fix init values for command register
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 9 Dec 2009 20:35:37 +0000 (22:35 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 15 Dec 2009 11:55:20 +0000 (13:55 +0200)
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 <lcapitulino@redhat.com>
Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/e1000.c

index 8566fe327690e1efe060729b08b04384f10b1af2..ad7a26796214b4ee5f7cee86c8b7557c5910a820 100644 (file)
@@ -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);