[PATCH] rpaphp.patch -- multi-function devices not handled correctly

Linda Xie lxiep at us.ibm.com
Sat May 22 08:40:29 EST 2004


John Rose wrote:

>Hey Linda-
>
>Just one more question...
>
>
>
>>>>+static int is_dr_dn(struct device_node *dn, int **indexes, int **names, int **types,
>>>>+	  int **power_domains, int **my_drc_index)
>>>>+{
>>>>+	if (!is_hotplug_capable(dn))
>>>>+		return (0);
>>>>+
>>>>+	*my_drc_index = (int *) get_property(dn, "ibm,my-drc-index", NULL);
>>>>+	if(!*my_drc_index)
>>>>+		return (0);
>>>>+
>>>>+	if (!dn->parent)
>>>>+		return (0);
>>>>+
>>>>+	return get_dn_properties(dn->parent, indexes, names, types, power_domains);
>>>>}
>>>>
>>>>
>>>This will fail for embedded slots, right?  Embedded slots won't have
>>>drc-indexes, types, or domains.
>>>
>>>
>>>
>>is_dr_dn() doesn't check for drc-indexes, only my-drc-index.
>>
>>
>
>Yes, but won't get_dn_properties() fail if it can't find drc-indexes,
>names, etc?
>
>
Please note that is_dr_dn calls get_dn_properties with dn->parent (not
dn).  EMBEDDED slot's drc-name, drc-type ... can be obtained from dn's
parent.

>Thanks-
>John
>
>
>
>
>
>


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list