[Pcihpd-discuss] Re: [PATCH] rpaphp.patch -- multi-function devices not handled correctly
Linda Xie
lxiep at us.ibm.com
Sat Jun 12 10:34:50 EST 2004
John Rose wrote:
>Hi Linda-
>
>I have just one question:
>
>
>
>>diff -Nru a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
>>--- a/drivers/pci/hotplug/rpadlpar_core.c Tue Jun 8 22:53:59 2004
>>+++ b/drivers/pci/hotplug/rpadlpar_core.c Tue Jun 8 22:53:59 2004
>>@@ -24,25 +24,6 @@
>> for (child = of_get_next_child(parent, NULL);
>>- child; child = of_get_next_child(parent, child)) {
>>+ child; child = of_get_next_child(parent, child)) {
>> loc_code = get_property(child, "ibm,loc-code", NULL);
>>- if (loc_code && !strcmp(loc_code, drc_name))
>>+ if (loc_code && !strncmp(loc_code, drc_name, strlen(drc_name)))
>> return child;
>> }
>>
>>
>>
>
>Can you explain why strncmp rather than strcmp?
>
>
The drc-name and loc-code of a virtual device were the same for a while.
Things have
been changed. For examples:
We used to have:
U787A.001.100048A-V1-C7(drc-name) , U787A.001.100048A-V1-C7(loc-code)
Now we have:
U787A.001.100048A-V1-C7(drc-name),
U787A.001.100048A-V1-C7-T1(loc-code)
So to identify the device_node corresponding to the drc-name passed in,
I have to change strcmp to strncmp. (I tested DLPAR VIO on veth(virtual
ethernet) and vscsi(virtual scsi) devices.)
Thanks,
Linda
>Other than this, looks good to me!
>
>Thanks-
>John
>
>
>On Wed, 2004-06-09 at 00:00, Linda Xie wrote:
>
>
>>Hi Greg,
>>
>>Thank you very much for your comments. The attached patch contains
>>the following fixes. (See my comments below).
>>
>>John, your rpadlpar patch has been merged.
>>
>>
>>Linda
>>
>>
>
>
>
>>______________________________________________________________________
>>
>>
>
>
>
>
>
>
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list