From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLkd-0001I1-Gh for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRLkX-0008Iq-GQ for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:41:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRLkX-0008Ik-6X for qemu-devel@nongnu.org; Wed, 02 Oct 2013 08:41:53 -0400 From: Marcel Apfelbaum Date: Wed, 2 Oct 2013 15:41:31 +0300 Message-Id: <1380717694-13091-7-git-send-email-marcel.a@redhat.com> In-Reply-To: <1380717694-13091-1-git-send-email-marcel.a@redhat.com> References: <1380717694-13091-1-git-send-email-marcel.a@redhat.com> Subject: [Qemu-devel] [PATCH RFC v2 6/9] hw/xhci: set interrupts using pci irq wrappers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, anthony@codemonkey.ws, mst@redhat.com, sw@weilnetz.de, jasowang@redhat.com, dkoch@verizon.com, keith.busch@intel.com, alex.williamson@redhat.com, kraxel@redhat.com, stefanha@redhat.com, dmitry@daynix.com, pbonzini@redhat.com, afaerber@suse.de, ehabkost@redhat.com pci_set_irq uses PCI_INTERRUPT_PIN config register to compute device INTx pin to assert/deassert. Removed irq field from xhci state. Signed-off-by: Marcel Apfelbaum --- hw/usb/hcd-xhci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 469c24d..54d6842 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -449,7 +449,6 @@ struct XHCIState { /*< public >*/ USBBus bus; - qemu_irq irq; MemoryRegion mem; MemoryRegion mem_cap; MemoryRegion mem_oper; @@ -739,7 +738,7 @@ static void xhci_intx_update(XHCIState *xhci) } trace_usb_xhci_irq_intx(level); - qemu_set_irq(xhci->irq, level); + pci_set_irq(pci_dev, level); } static void xhci_msix_update(XHCIState *xhci, int v) @@ -797,7 +796,7 @@ static void xhci_intr_raise(XHCIState *xhci, int v) if (v == 0) { trace_usb_xhci_irq_intx(1); - qemu_set_irq(xhci->irq, 1); + pci_set_irq(pci_dev, 1); } } @@ -3433,8 +3432,6 @@ static int usb_xhci_initfn(struct PCIDevice *dev) xhci->mfwrap_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, xhci_mfwrap_timer, xhci); - xhci->irq = dev->irq[0]; - memory_region_init(&xhci->mem, OBJECT(xhci), "xhci", LEN_REGS); memory_region_init_io(&xhci->mem_cap, OBJECT(xhci), &xhci_cap_ops, xhci, "capabilities", LEN_CAP); -- 1.8.3.1