Skip to contentSkip to conversation

e1000: Do not reinit pci config space to 0

PATCH New Amit Shah 1 participant 1 message May 4, 2009

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

PATCH 1/1 e1000: Do not reinit pci config space to 0

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.

---
 hw/e1000.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
hw/e1000.c +0 -1
index b0fe917..940e893 100644
@@ -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);
Signature · 1 line
1.6.0.6