[Bugfix v4 2/2] ACPI, PCI: Prevent binding other PCI drivers to IOAPIC PCI devices

From: Jiang Liu
Date: Fri Oct 09 2015 - 10:05:19 EST


The ACPI IOAPIC driver makes use of IOAPIC PCI devices, so prevent
binding other PCI drivers to IOAPIC PCI devices used by ACPI IOAPIC
driver.

Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
---
drivers/acpi/ioapic.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c
index ccdc8db16bb8..da71b274fc21 100644
--- a/drivers/acpi/ioapic.c
+++ b/drivers/acpi/ioapic.c
@@ -162,12 +162,14 @@ done:
list_add(&ioapic->list, &ioapic_list);
mutex_unlock(&ioapic_list_lock);

- if (dev)
+ if (dev) {
+ dev->match_driver = false;
dev_info(&dev->dev, "%s at %pR, GSI %u\n",
type, res, (u32)gsi_base);
- else
+ } else {
acpi_handle_info(handle, "%s at %pR, GSI %u\n",
type, res, (u32)gsi_base);
+ }

return AE_OK;

@@ -216,6 +218,7 @@ int acpi_ioapic_remove(struct acpi_pci_root *root)
if (ioapic->pdev) {
pci_release_region(ioapic->pdev, 0);
pci_disable_device(ioapic->pdev);
+ ioapic->pdev->match_driver = true;
pci_dev_put(ioapic->pdev);
} else if (ioapic->res.flags && ioapic->res.parent) {
release_resource(&ioapic->res);
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/