Index: sys/dev/mii/mii_fdt.c =================================================================== --- sys/dev/mii/mii_fdt.c +++ sys/dev/mii/mii_fdt.c @@ -326,20 +326,6 @@ return (&ma->obd); } -static ssize_t -miibus_fdt_get_property(device_t bus, device_t child, const char *propname, - void *buf, size_t size) -{ - struct mii_attach_args *ma; - - ma = device_get_ivars(child); - - if (ma->obd.obd_node == 0) - return (-1); - - return (OF_getencprop(ma->obd.obd_node, propname, buf, size)); -} - static device_method_t miibus_fdt_methods[] = { DEVMETHOD(device_probe, miibus_fdt_probe), DEVMETHOD(device_attach, miibus_fdt_attach), @@ -362,7 +348,6 @@ DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource_list, miibus_fdt_get_resource_list), - DEVMETHOD(bus_get_property, miibus_fdt_get_property), DEVMETHOD_END }; Index: sys/kern/bus_if.m =================================================================== --- sys/kern/bus_if.m +++ sys/kern/bus_if.m @@ -78,9 +78,13 @@ } static ssize_t - null_get_property(device_t dev, device_t child, const char *propname, + get_property_default(device_t bus, device_t dev, const char *propname, void *propvalue, size_t size) { + if (device_get_parent(bus) != NULL) { + return (BUS_GET_PROPERTY(device_get_parent(bus), dev, + propname, propvalue, size)); + } return (-1); } }; @@ -944,4 +948,4 @@ const char *_propname; void *_propvalue; size_t _size; -} DEFAULT null_get_property; +} DEFAULT get_property_default;