Lines Matching refs:dhdl

257 acpidev_dr_check_board_type(acpidev_data_handle_t dhdl,
260 if (dhdl->aod_class_id == ACPIDEV_CLASS_ID_MEMORY) {
266 dhdl->aod_bdtype = ACPIDEV_MEMORY_BOARD;
267 } else if (dhdl->aod_class_id == ACPIDEV_CLASS_ID_PCI ||
268 dhdl->aod_class_id == ACPIDEV_CLASS_ID_PCIEX) {
274 dhdl->aod_bdtype = ACPIDEV_IO_BOARD;
275 } else if (dhdl->aod_class_id == ACPIDEV_CLASS_ID_CONTAINER) {
277 dhdl->aod_bdtype = ACPIDEV_CPU_BOARD;
279 dhdl->aod_bdtype = ACPIDEV_SYSTEM_BOARD;
300 acpidev_data_handle_t dhdl, pdhdl;
314 dhdl = infop->awi_data;
315 ASSERT(dhdl != NULL);
318 if (ACPIDEV_DR_IS_PROCESSED(dhdl)) {
326 if (!ACPIDEV_DR_IS_BOARD(dhdl) &&
328 ACPIDEV_DR_SET_BOARD(dhdl);
332 if (!ACPIDEV_DR_IS_BOARD(dhdl)) {
339 ACPIDEV_DR_SET_FAILED(dhdl);
346 dhdl->aod_bdnum = atomic_inc_32_nv(&acpidev_dr_boards) - 1;
347 dhdl->aod_portid = 0;
353 dhdl->aod_bdidx = atomic_inc_32_nv(&pdhdl->aod_chidx);
359 dhdl->aod_bdidx = atomic_inc_32_nv(&acpidev_dr_board_index);
361 dhdl->aod_bdidx -= 1;
364 if (dhdl->aod_bdnum >= ACPIDEV_DR_MAX_BOARDS) {
365 ACPIDEV_DR_SET_FAILED(dhdl);
368 ACPIDEV_DR_MAX_BOARDS, dhdl->aod_bdnum + 1);
374 arg.bdnum = dhdl->aod_bdnum;
378 ACPIDEV_DR_SET_FAILED(dhdl);
385 acpidev_dr_check_board_type(dhdl, &arg, infop->awi_name);
392 acpidev_dr_board_handles[dhdl->aod_bdnum] = infop->awi_hdl;
553 acpidev_data_handle_t dhdl;
556 dhdl = acpidev_data_get_handle(hdl);
557 if (dhdl == NULL) {
560 } else if (ACPIDEV_DR_IS_BOARD(dhdl) && ACPIDEV_DR_IS_WORKING(dhdl) &&
561 dhdl->aod_bdnum == (intptr_t)ctx) {
633 acpidev_data_handle_t dhdl;
642 dhdl = acpidev_data_get_handle(hdl);
643 if (dhdl == NULL) {
647 type = dhdl->aod_bdtype;
656 acpidev_data_handle_t dhdl;
664 dhdl = acpidev_data_get_handle(hdl);
665 if (dhdl == NULL) {
670 *bnump = dhdl->aod_bdnum;
682 acpidev_data_handle_t dhdl;
693 dhdl = acpidev_data_get_handle(thdl);
694 if (dhdl == NULL) {
700 if (!ACPIDEV_DR_IS_BOARD(dhdl)) {
708 if (ACPIDEV_DR_IS_FAILED(dhdl)) {
720 dhdls[count] = dhdl;
734 dhdl = dhdls[count];
735 switch (dhdl->aod_bdtype) {
754 dhdl->aod_bdtype);
764 dhdl->aod_bdidx);
903 acpidev_data_handle_t dhdl;
917 dhdl = acpidev_data_get_handle(hdl);
918 if (dhdl == NULL) {
922 } else if ((dip = acpidev_data_get_devinfo(dhdl)) == NULL) {
969 acpidev_data_handle_t dhdl;
975 dhdl = acpidev_data_get_handle(hdl);
976 if (dhdl == NULL) {
978 } else if (!ACPIDEV_DR_IS_WORKING(dhdl)) {
984 *(uint32_t *)(void *)buf = dhdl->aod_portid;
989 *(uint32_t *)(void *)buf = dhdl->aod_bdnum;
993 switch (dhdl->aod_class_id) {
1093 acpidev_data_handle_t dhdl;
1098 dhdl = acpidev_data_get_handle(hdl);
1099 if (dhdl == NULL) {
1103 } else if (dhdl->aod_class_id != ACPIDEV_CLASS_ID_MEMORY) {
1108 *idxp = dhdl->aod_memidx;
1117 acpidev_data_handle_t dhdl;
1126 dhdl = acpidev_data_get_handle(hdl);
1127 if (dhdl == NULL) {
1129 } else if (!ACPIDEV_DR_IS_BOARD(dhdl)) {
1398 acpidev_data_handle_t dhdl;
1401 dhdl = acpidev_data_get_handle(hdl);
1402 if (dhdl == NULL) {
1438 dhdl = acpidev_data_create_handle(hdl);
1439 if (dhdl != NULL) {
1440 dhdl->aod_hdl = hdl;
1441 dhdl->aod_level = rlvl;
1445 if (dhdl == NULL) {
1451 if (ACPIDEV_DR_IS_READY(dhdl)) {
1456 if (dhdl->aod_bdnum == ap->bdnum) {
1472 dhdl->aod_class_id = clsid;
1473 dhdl->aod_bdnum = ap->bdnum;
1474 dhdl->aod_portid = atomic_inc_32_nv(devid) - 1;
1476 dhdl->aod_memidx = acpidev_dr_memory_device_cnt;
1477 ASSERT(dhdl->aod_memidx < ACPI_MEMNODE_DEVID_BOOT);
1479 ACPIDEV_DR_SET_READY(dhdl);
1642 acpidev_dr_create_walk_info(ACPI_HANDLE hdl, acpidev_data_handle_t dhdl,
1651 ASSERT(dhdl != NULL);
1652 ASSERT(dhdl->aod_class_list != NULL);
1684 pdhdl->aod_level, phdl, dhdl->aod_class_list, NULL);
1739 acpidev_dr_probe_object(ACPI_HANDLE hdl, acpidev_data_handle_t dhdl)
1751 ASSERT(dhdl != NULL);
1752 if (hdl == NULL || dhdl == NULL) {
1753 ACPIDEV_DEBUG(CE_WARN, "!acpidev: hdl or dhdl is NULL in "
1769 if (dhdl->aod_class_list == NULL) {
1780 rc = acpidev_dr_create_walk_info(hdl, dhdl, objname, &infop, &cinfop);
1792 ASSERT(cinfop->awi_data == dhdl);
1865 acpidev_data_handle_t dhdl;
1873 dhdl = acpidev_data_get_handle(hdl);
1874 if (dhdl == NULL) {
1885 if (ACPIDEV_DR_IS_BOARD(dhdl)) {
1888 } else if (!ACPIDEV_DR_IS_WORKING(dhdl)) {
1915 if (dhdl->aod_class_id == ACPIDEV_CLASS_ID_PCI ||
1916 dhdl->aod_class_id == ACPIDEV_CLASS_ID_PCIEX) {
1933 rc = acpidev_dr_probe_object(hdl, dhdl);
1951 acpidev_data_handle_t dhdl;
1962 dhdl = acpidev_data_get_handle(hdl);
1963 if (dhdl == NULL) {
1972 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
1977 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
1994 dip = acpidev_data_get_devinfo(dhdl);
2012 rc = acpidev_dr_probe_object(hdl, dhdl);
2023 ACPIDEV_DR_SET_FAILED(dhdl);
2042 acpidev_data_handle_t dhdl;
2054 dhdl = acpidev_data_get_handle(hdl);
2055 if (dhdl == NULL) {
2066 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
2072 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2084 if (ACPIDEV_DR_IS_BOARD(dhdl)) {
2089 if (!ACPIDEV_DR_IS_READY(dhdl)) {
2095 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2104 status = acpidev_data_get_status(dhdl);
2110 dip = acpidev_data_get_devinfo(dhdl);
2120 switch (dhdl->aod_class_id) {
2130 "support unconfiguration.", objname, dhdl->aod_class_id);
2148 if ((dhdl->aod_iflag & ACPIDEV_ODF_DEVINFO_TAGGED) &&
2153 ACPIDEV_DR_SET_FAILED(dhdl);
2162 if ((dhdl->aod_iflag & ACPIDEV_ODF_DEVINFO_TAGGED) &&
2169 ACPIDEV_DR_SET_FAILED(dhdl);
2181 dhdl->aod_dip = NULL;
2182 dhdl->aod_iflag &= ~ACPIDEV_ODF_DEVINFO_CREATED;
2183 dhdl->aod_iflag &= ~ACPIDEV_ODF_DEVINFO_TAGGED;
2184 if (dhdl->aod_class != NULL) {
2185 if (dhdl->aod_class->adc_fini != NULL) {
2186 (*(dhdl->aod_class->adc_fini))(hdl, dhdl,
2187 dhdl->aod_class);
2189 atomic_dec_32(&(dhdl->aod_class->adc_refcnt));
2190 dhdl->aod_class = NULL;
2192 dhdl->aod_iflag &= ~ACPIDEV_ODF_STATUS_VALID;
2193 dhdl->aod_status = 0;
2206 acpidev_data_handle_t dhdl;
2218 dhdl = acpidev_data_get_handle(hdl);
2219 if (dhdl == NULL) {
2228 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
2233 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2259 ACPIDEV_DR_SET_FAILED(dhdl);
2271 acpidev_data_handle_t dhdl;
2273 dhdl = acpidev_data_get_handle(hdl);
2274 if (dhdl == NULL) {
2282 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
2286 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2299 acpidev_data_handle_t dhdl;
2301 dhdl = acpidev_data_get_handle(hdl);
2302 if (dhdl == NULL) {
2310 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
2314 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2332 acpidev_data_handle_t dhdl;
2334 dhdl = acpidev_data_get_handle(hdl);
2335 if (dhdl == NULL) {
2343 if (!ACPIDEV_DR_BOARD_READY(dhdl)) {
2347 } else if (ACPIDEV_DR_IS_FAILED(dhdl)) {
2375 acpidev_data_handle_t dhdl;
2393 dhdl = acpidev_data_get_handle(hdl);
2394 if (dhdl == NULL) {
2400 if (!ACPIDEV_DR_IS_READY(dhdl)) {
2405 if (ACPIDEV_DR_IS_FAILED(dhdl)) {