Skip to contentSkip to conversation

usb-ehci: move device/vendor/class id to qdev

PATCH Superseded Michael S. Tsirkin 2 participants 3 messages Jun 14, 2011 – Jun 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb-ehci: move device/vendor/class id to qdev

This is on top of my pci tree.

---
 hw/usb-ehci.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
hw/usb-ehci.c +4 -5
index f63519e..4d6989a 100644
@@ -1945,6 +1945,10 @@ static PCIDeviceInfo ehci_info = {
     .qdev.name    = "usb-ehci",
     .qdev.size    = sizeof(EHCIState),
     .init         = usb_ehci_initfn,
+    .vendor_id    = PCI_VENDOR_ID_INTEL,
+    .device_id    = PCI_DEVICE_ID_INTEL_82801D,
+    .revision     = 0x10,
+    .class_id     = PCI_CLASS_SERIAL_USB,
 };
 
 static int usb_ehci_initfn(PCIDevice *dev)
@@ -1953,12 +1957,7 @@ static int usb_ehci_initfn(PCIDevice *dev)
     uint8_t *pci_conf = s->dev.config;
     int i;
 
-    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
-    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82801D);
-    pci_set_byte(&pci_conf[PCI_REVISION_ID], 0x10);
     pci_set_byte(&pci_conf[PCI_CLASS_PROG], 0x20);
-    pci_config_set_class(pci_conf, PCI_CLASS_SERIAL_USB);
-    pci_set_byte(&pci_conf[PCI_HEADER_TYPE], PCI_HEADER_TYPE_NORMAL);
 
     /* capabilities pointer */
     pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00);
Signature · 1 line
1.7.5.53.gc233e
#1 lore raw
Quoted 1 line · Michael S. Tsirkin

This is on top of my pci tree.

Looks good. Wanna queue this up in your PCI tree, so all devices are switched over at once when this is merged?

cheers,
Gerd

#2 lore raw
Quoted 8 lines · Gerd Hoffmann
Quoted 1 line · Michael S. Tsirkin

This is on top of my pci tree.

Looks good. Wanna queue this up in your PCI tree, so all devices are switched over at once when this is merged?

cheers,
Gerd

Guess so, yes.
Thanks for the review.

Signature · 1 line
MST