Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151585399
D47487.id146711.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47487.id146711.diff
View Options
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -72,19 +72,33 @@
{
struct lookup_irq_request *req;
size_t len;
- u_int irqnum, irq, trig, pol;
+ u_int irqnum, trig, pol;
+ bool found;
+
+ found = false;
+ req = (struct lookup_irq_request *)context;
switch (res->Type) {
case ACPI_RESOURCE_TYPE_IRQ:
irqnum = res->Data.Irq.InterruptCount;
- irq = res->Data.Irq.Interrupts[0];
+ for (int i = 0; i < irqnum; i++) {
+ if (res->Data.Irq.Interrupts[i] == req->irq) {
+ found = true;
+ break;
+ }
+ }
len = ACPI_RS_SIZE(ACPI_RESOURCE_IRQ);
trig = res->Data.Irq.Triggering;
pol = res->Data.Irq.Polarity;
break;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
irqnum = res->Data.ExtendedIrq.InterruptCount;
- irq = res->Data.ExtendedIrq.Interrupts[0];
+ for (int i = 0; i < irqnum; i++) {
+ if (res->Data.ExtendedIrq.Interrupts[i] == req->irq) {
+ found = true;
+ break;
+ }
+ }
len = ACPI_RS_SIZE(ACPI_RESOURCE_EXTENDED_IRQ);
trig = res->Data.ExtendedIrq.Triggering;
pol = res->Data.ExtendedIrq.Polarity;
@@ -92,18 +106,13 @@
default:
return (AE_OK);
}
- if (irqnum != 1)
+ if (!found)
return (AE_OK);
- req = (struct lookup_irq_request *)context;
if (req->checkrid) {
if (req->counter != req->rid) {
req->counter++;
return (AE_OK);
}
- KASSERT(irq == req->irq, ("IRQ resources do not match"));
- } else {
- if (req->irq != irq)
- return (AE_OK);
}
req->found = 1;
req->pol = pol;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 8:31 AM (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31213575
Default Alt Text
D47487.id146711.diff (1 KB)
Attached To
Mode
D47487: acpi: Handle multiple interrupts
Attached
Detach File
Event Timeline
Log In to Comment