From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0xL7-0005N8-2w for qemu-devel@nongnu.org; Mon, 04 May 2009 08:32:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0xL1-0005I9-OT for qemu-devel@nongnu.org; Mon, 04 May 2009 08:32:08 -0400 Received: from [199.232.76.173] (port=46225 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0xL1-0005Hx-7j for qemu-devel@nongnu.org; Mon, 04 May 2009 08:32:03 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51605) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M0xL0-0008JH-Ki for qemu-devel@nongnu.org; Mon, 04 May 2009 08:32:02 -0400 From: Amit Shah Date: Mon, 4 May 2009 18:02:04 +0530 Message-Id: <1241440324-12560-1-git-send-email-amit.shah@redhat.com> Subject: [Qemu-devel] [PATCH] e1000: Do not reinit pci config space to 0 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.cs Cc: Amit Shah , qemu-devel@nongnu.org pci_register_device already mallocs the pci config space buffer filled with zeroes. Doing this again breaks some default config space writes like setting the subsystem vendor id and subsystem device id. Signed-off-by: Amit Shah --- hw/e1000.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/e1000.c b/hw/e1000.c index b0fe917..940e893 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1067,7 +1067,6 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn) return NULL; pci_conf = d->dev.config; - memset(pci_conf, 0, 256); pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, E1000_DEVID); -- 1.6.0.6