Lines Matching defs:scanp
723 pm_scan_t *scanp;
728 scanp = PM_GET_PM_SCAN(dip);
729 if (!scanp) {
732 scanp = kmem_zalloc(sizeof (pm_scan_t), KM_SLEEP);
733 DEVI(dip)->devi_pm_scan = scanp;
734 } else if (scanp->ps_scan_flags & PM_SCAN_STOP) {
737 scanp->ps_scan_flags &= ~PM_SCAN_STOP;
749 pm_scan_t *scanp;
754 scanp = PM_GET_PM_SCAN(dip);
755 if (!scanp) {
760 ASSERT(!scanp->ps_scan_id && !(scanp->ps_scan_flags &
763 kmem_free(scanp, sizeof (pm_scan_t));
952 pm_scan_t *scanp;
958 scanp = PM_GET_PM_SCAN(dip);
959 if (pm_scans_disabled || !PM_SCANABLE(dip) || !info || !scanp ||
960 (scanp->ps_scan_flags & PM_SCAN_STOP)) {
964 if (scanp->ps_scan_flags & PM_SCANNING) {
965 scanp->ps_scan_flags |= PM_SCAN_AGAIN;
968 } else if (scanp->ps_scan_id) {
969 scanid = scanp->ps_scan_id;
970 scanp->ps_scan_id = 0;
994 (scanp->ps_scan_flags & PM_SCAN_DISPATCHED) ||
998 if (scanp->ps_scan_id) {
999 scanid = scanp->ps_scan_id;
1000 scanp->ps_scan_id = 0;
1004 if (scanp->ps_scan_id) {
1008 (ulong_t)scanp->ps_scan_id))
1013 scanp->ps_scan_id = timeout(pm_rescan, (void *)dip,
1014 (scanp->ps_idle_down ? pm_id_ticks :
1018 (ulong_t)scanp->ps_scan_id))
1022 scanp->ps_scan_flags |= PM_SCAN_DISPATCHED;
1032 pm_scan_t *scanp;
1038 scanp = PM_GET_PM_SCAN(dip);
1039 ASSERT(scanp && PM_GET_PM_INFO(dip));
1042 (scanp->ps_scan_flags & PM_SCAN_STOP)) {
1043 scanp->ps_scan_flags &= ~(PM_SCAN_AGAIN | PM_SCAN_DISPATCHED);
1048 if (scanp->ps_idle_down) {
1053 PMID_SET_SCANS(scanp->ps_idle_down)
1055 "(pmid %x)\n", pmf, PM_DEVICE(dip), scanp->ps_idle_down))
1059 if (scanp->ps_scan_flags & PM_SCANNING) {
1060 scanp->ps_scan_flags |= PM_SCAN_AGAIN;
1063 scanp->ps_scan_flags &= ~PM_SCAN_DISPATCHED;
1068 scanp->ps_scan_flags |= PM_SCANNING;
1069 scanp->ps_scan_flags &= ~PM_SCAN_DISPATCHED;
1071 scanp->ps_scan_flags &= ~PM_SCAN_AGAIN;
1075 } while (scanp->ps_scan_flags & PM_SCAN_AGAIN);
1077 ASSERT(scanp->ps_scan_flags & PM_SCANNING);
1078 scanp->ps_scan_flags &= ~PM_SCANNING;
1080 if (scanp->ps_idle_down) {
1081 scanp->ps_idle_down &= ~PMID_SCANS;
1083 "(pmid %x)\n", pmf, PM_DEVICE(dip), scanp->ps_idle_down))
1090 if (scanp->ps_scan_id) {
1093 PM_DEVICE(dip), (ulong_t)scanp->ps_scan_id))
1096 } else if (!(scanp->ps_scan_flags & PM_SCAN_STOP)) {
1097 scanp->ps_scan_id = timeout(pm_rescan, (void *)dip,
1101 (ulong_t)nextscan, (ulong_t)scanp->ps_scan_id))
1190 pm_scan_t *scanp;
1213 scanp = PM_GET_PM_SCAN(dip);
1215 ASSERT(scanp && PM_GET_PM_INFO(dip));
1223 (scanp->ps_scan_flags & PM_SCAN_STOP) ||
1349 pm_scan_t *scanp;
1354 scanp = PM_GET_PM_SCAN(dip);
1355 if (!scanp) {
1361 scanp->ps_scan_flags |= PM_SCAN_STOP;
1364 while (scanp->ps_scan_id) {
1365 scanid = scanp->ps_scan_id;
1366 scanp->ps_scan_id = 0;
1372 while (scanp->ps_scan_flags & (PM_SCANNING | PM_SCAN_DISPATCHED)) {
4634 pm_scan_t *scanp = PM_GET_PM_SCAN(dip);
4652 if (scanp && PM_IS_PID(dip)) {