From patchwork Tue Jun 14 17:35:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 100457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC595B6F65 for ; Wed, 15 Jun 2011 09:48:42 +1000 (EST) Received: from localhost ([::1]:47281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWdLb-0004aF-7F for incoming@patchwork.ozlabs.org; Tue, 14 Jun 2011 19:48:39 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXWr-00041h-W8 for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWXWp-00061N-Pl for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWXWp-000610-95 for qemu-devel@nongnu.org; Tue, 14 Jun 2011 13:35:51 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5EHZFXv014288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Jun 2011 13:35:15 -0400 Received: from redhat.com (dhcp-1-35.tlv.redhat.com [10.35.1.35]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p5EHZ9VD014499; Tue, 14 Jun 2011 13:35:10 -0400 Date: Tue, 14 Jun 2011 20:35:28 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <3f364eeef711d9150d3f6d55696c55d2a6dab4cd.1308072799.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 X-Mailman-Approved-At: Tue, 14 Jun 2011 19:32:52 -0400 Cc: Kevin Wolf , Alexander Graf , Anthony Liguori , Marcelo Tosatti , Gerd Hoffmann , Stefan Hajnoczi , kvm@vger.kernel.org, "Michael S. Tsirkin" , Jan Kiszka , Riku Voipio , qemu-devel@nongnu.org, Christoph Hellwig , Blue Swirl , Alex Williamson , Isaku Yamahata , Paul Brook , Paolo Bonzini , Avi Kivity , Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH 02/10] usb-ehci: move device/vendor/class id to qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Michael S. Tsirkin --- hw/usb-ehci.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index f63519e..4d6989a 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -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);