From nobody Tue Feb 10 11:56:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) client-ip=209.85.221.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1635860756; cv=none; d=zohomail.com; s=zohoarc; b=RTD/b42tZQExS46T1mJA3tK/KvCXT7awX2nRHuVEpcCtRYVFhToD2q2oDWIq2eB2GVvgRPKnpbmJeiFoj8Rdx3UDt29UbgZi2zj57hfBcLneI+bsI2qxQWGGvBBh3KjKvOKFIb8/ElCeIXCzjviHlyOdm1AptdYTMMeieVHdtDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635860756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3GPMsZfnn4ZfssdGOMr+SGtI/4dHR+YaPHIAKWs/umE=; b=SGXzaIL9VS1/V8OSPPUxUjoq7izVzicbPeLNsGTR9aGeHpReLieple2/ehEvajH9+GPn3lRsZk04HHK0/8XEBlLh7jv6EmwY6MzWKNXo8HFCn2kt9UPB6nmHjf9Z0lHvUOBAFFb4rjYe4QkUfXufVgNmY4MXSXMfUeWWAAsp+Y4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.zohomail.com with SMTPS id 1635860756008275.13484438893045; Tue, 2 Nov 2021 06:45:56 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id d3so33375615wrh.8 for ; Tue, 02 Nov 2021 06:45:55 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id p18sm2628776wmq.4.2021.11.02.06.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 06:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3GPMsZfnn4ZfssdGOMr+SGtI/4dHR+YaPHIAKWs/umE=; b=LDyxw8yH/CG3bJ5Viu8sk/v7TzrgApxn7X4WhbnbCFPNpK79B3BX8MiH6NiiIhCWv0 9AHUAsCViY9uqS2nW2CIslqKPAbxGE/npYK94mbXzKTsioXxwS0US7/2HLzYkfz747Xt YaPIYKSEiE6pRJHQd9VkPxr3HyNg2qlMoovgZHv1Lg/dbYxL/6G0I9XzHQGoahkKdZ4X x8RvJmdPIgrMYukY6TnLl9DNi3FA4DHvhxAOasoTrOG0QGoP95Zc2TdD6/AfL/1iL/zi 4WdNWkPlW25rlQ2ymKnKw8DWvQyi+LlvPOaTXgyoQrjyc2ufYjQR6W3Je3Qm/SfacQ+G oFJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3GPMsZfnn4ZfssdGOMr+SGtI/4dHR+YaPHIAKWs/umE=; b=HycswTEUj6co+fmCS4JtX8SzGgXO1O0Y4XA+J2xDNJjJ3gRtyIdTeNf3qVU7hFQhVO owjES5uvlk9gzP17CobP18sorcX8N+RxxcrjEhYbAq7Tb0Wfuex7kjiSZaf7iSZGrApC JzKEPMkXcskDzY/WOdvUekdB4GKuuJI8JDLcZ1OWsOV4wc7BKOSELgQ32oKbCSGv3ojh ecACRHv75+mnTCYvmd9GDwa29zv/6m2J15v8McabpninPKnlvYBKkeqkSzxfFD9tv3Wf Gfr5wUs6ILn3R5Et77029uJZGXz85zM/z+a/isQrYcuGseDWbw5m83ixMU08heAx0IYd dwaA== X-Gm-Message-State: AOAM530W5Xc1WmG2Zr+2qfLX84o/O7e+kTGv5SWm9M6O3L1Qi2h7t3Xp xuHUO0PlduHRokxvMBd6MlnZpNoKOzc= X-Google-Smtp-Source: ABdhPJwEoRphZm/JsjD5xLIu2zrH1++egeiXxJuRGXvFM5CnC4ixGBrK/3RdQd1VaVsdnxSP5mfg8g== X-Received: by 2002:a05:6000:2ca:: with SMTP id o10mr46156758wry.383.1635860754088; Tue, 02 Nov 2021 06:45:54 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Aleksandar Rikalo , Aurelien Jarno , BALATON Zoltan , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 40/41] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts Date: Tue, 2 Nov 2021 14:42:39 +0100 Message-Id: <20211102134240.3036524-41-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211102134240.3036524-1-f4bug@amsat.org> References: <20211102134240.3036524-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1635860758612100001 From: BALATON Zoltan This device is part of a superio/ISA bridge chip and IRQs from it are routed to an ISA interrupt set by the Interrupt Line PCI config register. Implement this in a vt82c686-uhci-pci specific irq handler Using via_isa_set_irq(). Signed-off-by: BALATON Zoltan Reviewed-by: Jiaxun Yang Reviewed-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <8d7ed385e33a847d8ddc669163a68b5ca57f82ce.1635161629.git.balato= n@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/vt82c686-uhci-pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/usb/vt82c686-uhci-pci.c b/hw/usb/vt82c686-uhci-pci.c index ea262e6d709..0bf2b72ff08 100644 --- a/hw/usb/vt82c686-uhci-pci.c +++ b/hw/usb/vt82c686-uhci-pci.c @@ -1,6 +1,17 @@ #include "qemu/osdep.h" +#include "hw/irq.h" +#include "hw/isa/vt82c686.h" #include "hcd-uhci.h" =20 +static void uhci_isa_set_irq(void *opaque, int irq_num, int level) +{ + UHCIState *s =3D opaque; + uint8_t irq =3D pci_get_byte(s->dev.config + PCI_INTERRUPT_LINE); + if (irq > 0 && irq < 15) { + via_isa_set_irq(pci_get_function_0(&s->dev), irq, level); + } +} + static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp) { UHCIState *s =3D UHCI(dev); @@ -14,6 +25,8 @@ static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Er= ror **errp) pci_set_long(pci_conf + 0xc0, 0x00002000); =20 usb_uhci_common_realize(dev, errp); + object_unref(s->irq); + s->irq =3D qemu_allocate_irq(uhci_isa_set_irq, s, 0); } =20 static UHCIInfo uhci_info[] =3D { --=20 2.31.1