Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/usb_hub_acpi.c
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | if ((devinfo->Valid & ACPI_VALID_ADR) && | ||||
char buf[] = "portXXX"; | char buf[] = "portXXX"; | ||||
struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); | struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); | ||||
struct sysctl_oid *oid; | struct sysctl_oid *oid; | ||||
struct sysctl_oid_list *tree; | struct sysctl_oid_list *tree; | ||||
snprintf(buf, sizeof(buf), "port%ju", | snprintf(buf, sizeof(buf), "port%ju", | ||||
(uintmax_t)devinfo->Address); | (uintmax_t)devinfo->Address); | ||||
oid = SYSCTL_ADD_NODE(ctx, | oid = SYSCTL_ADD_NODE(ctx, | ||||
SYSCTL_CHILDREN( | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
device_get_sysctl_tree(dev)), | OID_AUTO, buf, CTLFLAG_RD | CTLFLAG_MPSAFE, | ||||
OID_AUTO, buf, CTLFLAG_RD, | |||||
NULL, "port nodes"); | NULL, "port nodes"); | ||||
tree = SYSCTL_CHILDREN(oid); | tree = SYSCTL_CHILDREN(oid); | ||||
sc->port[devinfo->Address - 1].handle = ah; | sc->port[devinfo->Address - 1].handle = ah; | ||||
sc->port[devinfo->Address - 1].upc = 0xffffffff; | sc->port[devinfo->Address - 1].upc = 0xffffffff; | ||||
acpi_uhub_parse_upc(dev, devinfo->Address, ah, tree); | acpi_uhub_parse_upc(dev, devinfo->Address, ah, tree); | ||||
acpi_uhub_parse_pld(dev, devinfo->Address, ah, tree); | acpi_uhub_parse_pld(dev, devinfo->Address, ah, tree); | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), tree, | ||||
tree, OID_AUTO, "info", | OID_AUTO, "info", | ||||
CTLTYPE_STRING | CTLFLAG_RD, | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, | ||||
&sc->port[devinfo->Address - 1], 0, | &sc->port[devinfo->Address - 1], 0, | ||||
acpi_uhub_port_sysctl, | acpi_uhub_port_sysctl, "A", "Port information"); | ||||
"A", "Port information"); | |||||
} | } | ||||
AcpiOsFree(devinfo); | AcpiOsFree(devinfo); | ||||
} | } | ||||
return (AE_OK); | return (AE_OK); | ||||
} | } | ||||
static ACPI_STATUS | static ACPI_STATUS | ||||
acpi_usb_hub_port_probe(device_t dev, ACPI_HANDLE ah) | acpi_usb_hub_port_probe(device_t dev, ACPI_HANDLE ah) | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |