ACPI scan: Revert acpi_bus_find_driver() return value check
PATCH 1/1 ACPI scan: Revert acpi_bus_find_driver() return value check
2.6.13 introduced a change to drivers/acpi/scan.c along the lines of:
*
* TBD: Assumes LDM provides driver hot-plug capability.
*/- result = acpi_bus_find_driver(device);
+ acpi_bus_find_driver(device);
end:
if (!result)
This was inside this commit:
http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3fb02738b0fd36f47710a2bf207129efd2f5daa2
Since then, various HP/Compaq laptops have not been able to boot, freezing after these messages:
PCI: Using ACPI for IRQ routing
PCI: If a device does not work, try "pci=routeirq". If it helps, post a report
PCI: Cannot allocate resource region 7 of bridge 0000:00:1c.1
PCI: Cannot allocate resource region 8 of bridge 0000:00:1c.1
PCI: Cannot allocate resource region 9 of bridge 0000:00:1c.1
Rajesh Shah (the author of said commit) has since then acked that this small change should probably be reverted:
Quoted 6 lines
Looking at this closely now, checking for the result does appear to be wrong. Binding a driver for a device should be optional, and should not fail adding the device to the acpi list. I suspect a previous iteration through this code failed to find a driver match, returned failure to the caller and caused bad things to happen. So, your patch looks good to me.
The main diagnosis/discussion has been at:
https://bugzilla.novell.com/show_bug.cgi?id=116763
There are also some other reports elsewhere:
http://bugzilla.kernel.org/show_bug.cgi?id=5221
http://bugs.gentoo.org/112601
So far the investigation/fixing has been done by Thomas Renninger and others. I'm just hoping to breathe some life into an issue which has been sitting around for nearly 3 months.
If acceptable, please apply.
From: Thomas Renninger <[email protected]>
This patch reverts the acpi_bus_find_driver() return value check which was accidentally added in a big commit titled:
[PATCH] acpi bridge hotadd: Allow ACPI .add and .start operations to be done independently
This particular change broke booting of some HP/Compaq laptops unless acpi=noirq is used.
See http://bugzilla.kernel.org/show_bug.cgi?id=5221
drivers/acpi/scan.c +1 -1
@@ -1111,7 +1111,7 @@* * TBD: Assumes LDM provides driver hot-plug capability. */ - result =acpi_bus_find_driver (device); +acpi_bus_find_driver (device); end:if (!result)