Lines Matching refs:DCP

62 #define	DCP(x)	((struct devctl_hdl *)(x))  macro
87 if (DCP(hdl)->fd != -1) in devctl_release()
88 (void) close(DCP(hdl)->fd); in devctl_release()
90 if (DCP(hdl)->opath != NULL) in devctl_release()
91 free(DCP(hdl)->opath); in devctl_release()
93 if (DCP(hdl)->nodename != NULL) in devctl_release()
94 free(DCP(hdl)->nodename); in devctl_release()
96 if (DCP(hdl)->unitaddr != NULL) in devctl_release()
97 free(DCP(hdl)->unitaddr); in devctl_release()
460 dcp->fd = dup(DCP(pc)->fd); in dc_mkhndl()
488 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_raisepower()
489 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_raisepower()
494 rv = dc_cmd(DEVCTL_PM_RAISE_PWR, 0, DCP(dcp), NULL, NULL); in devctl_pm_raisepower()
510 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_changepowerhigh()
511 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_changepowerhigh()
516 rv = dc_cmd(DEVCTL_PM_CHANGE_PWR_HIGH, 0, DCP(dcp), NULL, NULL); in devctl_pm_changepowerhigh()
532 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_changepowerlow()
533 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_changepowerlow()
538 rv = dc_cmd(DEVCTL_PM_CHANGE_PWR_LOW, 0, DCP(dcp), NULL, NULL); in devctl_pm_changepowerlow()
554 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_idlecomponent()
555 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_idlecomponent()
560 rv = dc_cmd(DEVCTL_PM_IDLE_COMP, 0, DCP(dcp), NULL, NULL); in devctl_pm_idlecomponent()
576 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_busycomponent()
577 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_busycomponent()
582 rv = dc_cmd(DEVCTL_PM_BUSY_COMP, 0, DCP(dcp), NULL, NULL); in devctl_pm_busycomponent()
604 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_testbusy()
605 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_testbusy()
610 rv = dc_cmd(DEVCTL_PM_BUSY_COMP_TEST, 0, DCP(dcp), NULL, in devctl_pm_testbusy()
633 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_failsuspend()
634 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_failsuspend()
639 rv = dc_cmd(DEVCTL_PM_FAIL_SUSPEND, 0, DCP(dcp), NULL, NULL); in devctl_pm_failsuspend()
657 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_bus_teststrict()
662 rv = dc_cmd(DEVCTL_PM_BUS_STRICT_TEST, 0, DCP(dcp), NULL, in devctl_pm_bus_teststrict()
685 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_device_promprintf()
686 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_device_promprintf()
691 rv = dc_cmd(DEVCTL_PM_PROM_PRINTF, 0, DCP(dcp), NULL, NULL); in devctl_pm_device_promprintf()
708 if (dcp == NULL || (DCP(dcp)->hdltype != DEVCTL_PM_DEV && in devctl_pm_device_changeonresume()
709 DCP(dcp)->hdltype != DEVCTL_PM_BUS)) { in devctl_pm_device_changeonresume()
715 DCP(dcp), NULL, NULL); in devctl_pm_device_changeonresume()
731 if (dcp == NULL || DCP(dcp)->hdltype != DEVCTL_PM_DEV) { in devctl_pm_device_no_lower_power()
736 rv = dc_cmd(DEVCTL_PM_NO_LOWER_POWER, 0, DCP(dcp), NULL, NULL); in devctl_pm_device_no_lower_power()
753 if (dcp == NULL || DCP(dcp)->hdltype != DEVCTL_PM_BUS) { in devctl_pm_bus_no_invol()
758 rv = dc_cmd(DEVCTL_PM_BUS_NO_INVOL, 0, DCP(dcp), NULL, NULL); in devctl_pm_bus_no_invol()
773 if (dcp == NULL || DCP(dcp)->hdltype != DEVCTL_DEVICE) { in devctl_device_online()
778 rv = dc_cmd(DEVCTL_DEVICE_ONLINE, 0, DCP(dcp), NULL, NULL); in devctl_device_online()
794 if (dcp == NULL || DCP(dcp)->hdltype != DEVCTL_DEVICE) { in devctl_device_offline()
799 rv = dc_cmd(DEVCTL_DEVICE_OFFLINE, 0, DCP(dcp), NULL, NULL); in devctl_device_offline()
815 if (dcp == NULL || DCP(dcp)->hdltype != DEVCTL_DEVICE) { in devctl_device_remove()
820 rv = dc_cmd(DEVCTL_DEVICE_REMOVE, 0, DCP(dcp), NULL, NULL); in devctl_device_remove()
837 rv = dc_cmd(DEVCTL_BUS_QUIESCE, 0, DCP(dcp), NULL, NULL); in devctl_bus_quiesce()
850 rv = dc_cmd(DEVCTL_BUS_UNQUIESCE, 0, DCP(dcp), NULL, NULL); in devctl_bus_unquiesce()
863 rv = dc_cmd(DEVCTL_BUS_RESET, 0, DCP(dcp), NULL, NULL); in devctl_bus_reset()
876 rv = dc_cmd(DEVCTL_BUS_RESETALL, 0, DCP(dcp), NULL, NULL); in devctl_bus_resetall()
889 rv = dc_cmd(DEVCTL_DEVICE_RESET, 0, DCP(dcp), NULL, NULL); in devctl_device_reset()
908 rv = dc_cmd(DEVCTL_DEVICE_GETSTATE, 0, DCP(dcp), NULL, in devctl_device_getstate()
934 rv = dc_cmd(DEVCTL_BUS_GETSTATE, 0, DCP(dcp), NULL, in devctl_bus_getstate()
954 rv = dc_cmd(DEVCTL_BUS_CONFIGURE, 0, DCP(dcp), NULL, NULL); in devctl_bus_configure()
967 rv = dc_cmd(DEVCTL_BUS_UNCONFIGURE, 0, DCP(dcp), NULL, NULL); in devctl_bus_unconfigure()
996 rv = dc_cmd(DEVCTL_BUS_DEV_CREATE, flags, DCP(dcp), in devctl_bus_dev_create()
1006 (void) strcat(devpath, DCP(dcp)->opath); in devctl_bus_dev_create()
1038 rv = dc_cmd(DEVCTL_AP_CONNECT, 0, DCP(dcp), ap_data, NULL); in devctl_ap_connect()
1051 rv = dc_cmd(DEVCTL_AP_DISCONNECT, 0, DCP(dcp), ap_data, NULL); in devctl_ap_disconnect()
1064 rv = dc_cmd(DEVCTL_AP_INSERT, 0, DCP(dcp), ap_data, NULL); in devctl_ap_insert()
1077 rv = dc_cmd(DEVCTL_AP_REMOVE, 0, DCP(dcp), ap_data, NULL); in devctl_ap_remove()
1090 rv = dc_cmd(DEVCTL_AP_CONFIGURE, 0, DCP(dcp), ap_data, NULL); in devctl_ap_configure()
1103 rv = dc_cmd(DEVCTL_AP_UNCONFIGURE, 0, DCP(dcp), ap_data, NULL); in devctl_ap_unconfigure()
1118 rv = dc_cmd(DEVCTL_AP_GETSTATE, 0, DCP(dcp), ap_data, in devctl_ap_getstate()
1318 (void) snprintf(pathbuf, bufsz, "%s", DCP(dcp)->opath); in devctl_get_pathname()
1337 if ((dcp == NULL) || (DCP(dcp)->fd == -1)) { in dc_cmd()