From d13bff5f4df7cab2eae6cb79e2b821a08f51c9f0 Mon Sep 17 00:00:00 2001 From: Michael S. Tsirkin <mst@redhat.com> Date: Wed, 7 Apr 2010 11:20:11 -0300 Subject: [PATCH 01/12] pcnet: make subsystem vendor id match hardware RH-Author: Michael S. Tsirkin <mst@redhat.com> Message-id: <20100407112011.GA12002@redhat.com> Patchwork-id: 8412 O-Subject: [PATCHv2] pcnet: make subsystem vendor id match hardware Bugzilla: 521247 RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Amit Shah <amit.shah@redhat.com> RH-Acked-by: Markus Armbruster <armbru@redhat.com> Real pcnet device (AT2450) apparently has subsystem device and vendor id set to 0, this is out of spec (which requires that vendor id is obtained from PCI SIG) but windows xp driver seems to need this in order to associate. qemu sets pci subsystem id to qumranet/qemu since d350d97d196a632b6c7493acf07a061017fc6f7d, debian does not yet have this patch. https://bugzilla.redhat.com/show_bug.cgi?id=521247 Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> (cherry-picked from 7a7e5db99399dd5e17fc75036577f822a516b504) --- Changes from v1: fix build errors reported by Kevin. qemu/hw/pcnet.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/hw/pcnet.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pcnet.c b/qemu/hw/pcnet.c index 69fa054..884bc1d 100644 --- a/qemu/hw/pcnet.c +++ b/qemu/hw/pcnet.c @@ -2043,6 +2043,9 @@ PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn) *(uint32_t *)&pci_conf[0x10] = cpu_to_le32(0x00000001); *(uint32_t *)&pci_conf[0x14] = cpu_to_le32(0x00000000); + *(uint16_t *)&pci_conf[0x2c] = 0x0; + *(uint16_t *)&pci_conf[0x2e] = 0x0; + pci_conf[0x3d] = 1; // interrupt pin 0 pci_conf[0x3e] = 0x06; pci_conf[0x3f] = 0xff; -- 1.7.0.3