Re: [PATCH] PCI Hotplug: remove incorrect rpaphp firmwaredependency

From: David Woodhouse
Date: Mon Feb 07 2005 - 12:03:27 EST


On Thu, 2005-02-03 at 08:41 +0000, Linux Kernel Mailing List wrote:
> [PATCH] PCI Hotplug: remove incorrect rpaphp firmware dependency
>
> The RPA PCI Hotplug module incorrectly uses a certain firmware property when
> determining the hotplug capabilities of a slot. Recent firmware changes have
> demonstrated that this property should not be referenced or depended upon by
> the OS. This patch removes the dependency, and implements a correct set of
> logic for determining hotplug capabilities.
>
> Signed-off-by: John Rose <johnrose@xxxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>
>
> + rc = get_children_props(dn, indexes, names, &drc_types, power_domains);
> + if (rc) {
> + if (is_php_type((char *) &drc_types[1])) {
> + *types = drc_types;
> + return 1;
> + }
> + }

Er, use the result of the get_children_props() call only if it _failed_?
I suspect that wasn't your intention. This makes my G5 boot again:

--- linux-2.6.10/drivers/pci/hotplug/rpaphp_core.c.orig 2005-02-07 16:41:45.830990208 +0000
+++ linux-2.6.10/drivers/pci/hotplug/rpaphp_core.c 2005-02-07 16:46:15.495868912 +0000
@@ -307,7 +307,7 @@ static int is_php_dn(struct device_node
int rc;

rc = get_children_props(dn, indexes, names, &drc_types, power_domains);
- if (rc) {
+ if (!rc) {
if (is_php_type((char *) &drc_types[1])) {
*types = drc_types;
return 1;




--
dwmw2

-
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/