ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable
PATCH 1/1 ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable
The case ACPI_RESOURCE_TYPE_EXTENDED_IRQ inside acpi_pci_link_set() is correctly using resource->res.data.extended_irq.foo for most settings, but for the sharable setting it sofar has accidentally been using resource->res.data.irq.shareable instead of resource->res.data.extended_irq.shareable.
Note that the old code happens to also work because the sharable field offset is the same for both the acpi_resource_irq and acpi_resource_extended_irq structs.
--- drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pci_link.c +2 -2
@@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->res.data.extended_irq.polarity = link->irq.polarity;if (link->irq.triggering ==ACPI_EDGE_SENSITIVE ) - resource->res.data.irq.shareable = + resource->res.data.extended_irq.shareable =ACPI_EXCLUSIVE ;else - resource->res.data.irq.shareable =ACPI_SHARED ; + resource->res.data.extended_irq.shareable =ACPI_SHARED ; resource->res.data.extended_irq.interrupt_count =1 ; resource->res.data.extended_irq.interrupts[0 ] = irq;/* ignore resource_source, it's optional */
Signature · 1 line
2.26.0
Quoted 9 lines · Hans de Goede
The case
ACPI_RESOURCE_TYPE_EXTENDED_IRQinsideacpi_pci_link_set()is correctly usingresource->res.data.extended_irq.foofor most settings, but for the sharable setting it sofar has accidentally been usingresource->res.data.irq.shareableinstead ofresource->res.data.extended_irq.shareable.Note that the old code happens to also work because the sharable field offset is the same for both the
acpi_resource_irqandacpi_resource_extended_irqstructs.
s/sharable/shareable/ several times above
s/sofar/so far/
Quoted 1 line
Signed-off-by Hans de Goede <[email protected]>
Quoted 9 lines
--- drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/acpi/pci_link.c +0
-0
drivers/acpi/pci_link.c static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) · line 328
Quoted 9 lines
drivers/acpi/pci_link.c +2
-2@@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->res.data.extended_irq.polarity = link->irq.polarity;if (link->irq.triggering ==ACPI_EDGE_SENSITIVE ) - resource->res.data.irq.shareable = + resource->res.data.extended_irq.shareable =ACPI_EXCLUSIVE ;else - resource->res.data.irq.shareable =ACPI_SHARED ; + resource->res.data.extended_irq.shareable =ACPI_SHARED ;
Ouch, looks like that copy/paste error has been there since the beginning of git. Nice catch!
Quoted 6 lines
drivers/acpi/pci_link.c +0
-0resource->res.data.extended_irq.interrupt_count =1 ; resource->res.data.extended_irq.interrupts[0 ] = irq;/* ignore resource_source, it's optional */ Signature · 1 line
2.26.0
Hi,
Quoted 11 lines · Bjorn Helgaas
Quoted 9 lines · Hans de Goede
The case
ACPI_RESOURCE_TYPE_EXTENDED_IRQinsideacpi_pci_link_set()is correctly usingresource->res.data.extended_irq.foofor most settings, but for the sharable setting it sofar has accidentally been usingresource->res.data.irq.shareableinstead ofresource->res.data.extended_irq.shareable.Note that the old code happens to also work because the sharable field offset is the same for both the
acpi_resource_irqandacpi_resource_extended_irqstructs.
Quoted 6 lines
s/sharable/shareable/ several times above
s/sofar/so far/Quoted 1 line
Signed-off-by Hans de Goede <[email protected]>Acked-by Bjorn Helgaas <[email protected]>
Thanks, I'll send out a v2 with the spelling issues in the commit-msg fixed.
Regards,
Hans
Quoted 30 lines
Quoted 10 lines
--- drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/acpi/pci_link.c +0
-0drivers/acpi/pci_link.c static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) · line 328
Quoted 9 lines
drivers/acpi/pci_link.c +2
-2@@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->res.data.extended_irq.polarity = link->irq.polarity;if (link->irq.triggering ==ACPI_EDGE_SENSITIVE ) - resource->res.data.irq.shareable = + resource->res.data.extended_irq.shareable =ACPI_EXCLUSIVE ;else - resource->res.data.irq.shareable =ACPI_SHARED ; + resource->res.data.extended_irq.shareable =ACPI_SHARED ;Ouch, looks like that copy/paste error has been there since the beginning of git. Nice catch!
Quoted 6 lines
drivers/acpi/pci_link.c +0
-0resource->res.data.extended_irq.interrupt_count =1 ; resource->res.data.extended_irq.interrupts[0 ] = irq;/* ignore resource_source, it's optional */ Signature · 1 line
2.26.0