From 9e64f8a3fcc88a508990a62ecc5a1269e41272ad Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Mon, 7 Oct 2013 10:36:39 +0300 Subject: hw: set interrupts using pci irq wrappers pci_set_irq and the other pci irq wrappers use PCI_INTERRUPT_PIN config register to compute device INTx pin to assert/deassert. An irq is allocated using pci_allocate_irq wrapper only if is needed by non pci devices. Removed irq related fields from state if not used anymore. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw/usb/hcd-uhci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hw/usb/hcd-uhci.c') diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index becc7faec1..238d1d2b5f 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -164,7 +164,6 @@ struct UHCIState { /* Interrupts that should be raised at the end of the current frame. */ uint32_t pending_int_mask; - int irq_pin; /* Active packets */ QTAILQ_HEAD(, UHCIQueue) queues; @@ -381,7 +380,7 @@ static void uhci_update_irq(UHCIState *s) } else { level = 0; } - qemu_set_irq(s->dev.irq[s->irq_pin], level); + pci_set_irq(&s->dev, level); } static void uhci_reset(void *opaque) @@ -1240,8 +1239,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev) /* TODO: reset value should be 0. */ pci_conf[USB_SBRN] = USB_RELEASE_1; // release number - s->irq_pin = u->info.irq_pin; - pci_config_set_interrupt_pin(pci_conf, s->irq_pin + 1); + pci_config_set_interrupt_pin(pci_conf, u->info.irq_pin + 1); if (s->masterbus) { USBPort *ports[NB_PORTS]; -- cgit v1.2.1