Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/twe/twe_freebsd.c
Show All 12 Lines | |||||
/* | /* | ||||
* XXX: This sysctl tree must stay at hw.tweX rather than using | * XXX: This sysctl tree must stay at hw.tweX rather than using | ||||
* the device_get_sysctl_tree() created by new-bus because | * the device_get_sysctl_tree() created by new-bus because | ||||
* existing 3rd party binary tools such as tw_cli and 3dm2 use the | * existing 3rd party binary tools such as tw_cli and 3dm2 use the | ||||
* existence of this sysctl node to discover controllers. | * existence of this sysctl node to discover controllers. | ||||
*/ | */ | ||||
sysctl_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), | sysctl_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), | ||||
SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, | SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, | ||||
device_get_nameunit(dev), CTLFLAG_RD, 0, ""); | device_get_nameunit(dev), CTLFLAG_RD | CTLFLAG_MPSAFE, 0, ""); | ||||
if (sysctl_tree == NULL) { | if (sysctl_tree == NULL) { | ||||
twe_printf(sc, "cannot add sysctl tree node\n"); | twe_printf(sc, "cannot add sysctl tree node\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sysctl_tree), | SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(sysctl_tree), | ||||
OID_AUTO, "driver_version", CTLFLAG_RD, TWE_DRIVER_VERSION_STRING, 0, | OID_AUTO, "driver_version", CTLFLAG_RD, TWE_DRIVER_VERSION_STRING, 0, | ||||
"TWE driver version"); | "TWE driver version"); | ||||
Show All 12 Lines |