[RFC] Fix OF_finddevice return code for FDT

Jayachandran C. jchandra at freebsd.org
Thu Nov 3 07:52:16 UTC 2011


[I had posted this to freebsd-ppc@ and freebsd-arm@, did not see any
comments, posting to freebsd-current@ to see if there is any interest
or comments]

While reviewing the previous FDT patch, nwhitehorn@ noted that the
return code of OF_finddevice was not correct in case of FDT. According
to the 1275 standard, we should return a phandle value of -1 in case
of error, but the ofw_fdt_finddevice implementation now returns 0.

The attached patches fixes this in the FDT code, and makes changes in
the callers to check the return code correctly. Since most of the
callers are in ARM, any testing on ARM would be really appreciated.

Thanks,
JC.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fdt-finddevice-fix.patch
Type: application/octet-stream
Size: 3182 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20111103/7b0ade68/fdt-finddevice-fix.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-fixes.patch
Type: application/octet-stream
Size: 2174 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20111103/7b0ade68/arm-fixes.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc-fixes.patch
Type: application/octet-stream
Size: 895 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20111103/7b0ade68/ppc-fixes.obj


More information about the freebsd-current mailing list