Lines Matching defs:DEVI

292 #define	DEVI(dev_info_type)	((struct dev_info *)(dev_info_type))
316 #define DDI_CF1(devi) (DEVI(devi)->devi_addr != NULL)
317 #define DDI_CF2(devi) (DEVI(devi)->devi_ops != NULL)
318 #define DDI_DRV_UNLOADED(devi) (DEVI(devi)->devi_ops == &mod_nodev_ops)
362 ((DEVI(dip)->devi_state & DEVI_DEVICE_OFFLINE) == DEVI_DEVICE_OFFLINE)
365 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
366 if (DEVI(dip)->devi_state & DEVI_DEVICE_DEGRADED) { \
367 mutex_exit(&DEVI(dip)->devi_lock); \
369 mutex_enter(&DEVI(dip)->devi_lock); \
372 DEVI(dip)->devi_state &= ~(DEVI_DEVICE_DOWN | \
377 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
378 DEVI(dip)->devi_state |= (DEVI_DEVICE_OFFLINE | DEVI_S_REPORT); \
382 ((DEVI(dip)->devi_state & DEVI_DEVICE_DOWN) == DEVI_DEVICE_DOWN)
385 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
387 DEVI(dip)->devi_state |= (DEVI_DEVICE_DOWN | DEVI_S_REPORT); \
391 ((DEVI(dip)->devi_state & \
395 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
397 mutex_exit(&DEVI(dip)->devi_lock); \
399 mutex_enter(&DEVI(dip)->devi_lock); \
400 DEVI(dip)->devi_state |= (DEVI_DEVICE_DEGRADED | DEVI_S_REPORT); \
404 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
406 if (DEVI(dip)->devi_state & DEVI_DEVICE_DEGRADED) { \
407 mutex_exit(&DEVI(dip)->devi_lock); \
409 mutex_enter(&DEVI(dip)->devi_lock); \
411 DEVI(dip)->devi_state &= ~(DEVI_DEVICE_DEGRADED | DEVI_DEVICE_DOWN); \
412 DEVI(dip)->devi_state |= DEVI_S_REPORT; \
417 ((DEVI(dip)->devi_state & DEVI_DEVICE_REMOVED) == DEVI_DEVICE_REMOVED)
420 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
421 DEVI(dip)->devi_state |= DEVI_DEVICE_REMOVED | DEVI_S_REPORT; \
425 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
426 DEVI(dip)->devi_state &= ~DEVI_DEVICE_REMOVED; \
427 DEVI(dip)->devi_state |= DEVI_S_REPORT; \
432 ((DEVI(dip)->devi_state & DEVI_BUS_QUIESCED) == DEVI_BUS_QUIESCED)
435 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
436 DEVI(dip)->devi_state &= ~DEVI_BUS_QUIESCED; \
437 DEVI(dip)->devi_state |= DEVI_S_REPORT; \
441 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
442 DEVI(dip)->devi_state |= (DEVI_BUS_QUIESCED | DEVI_S_REPORT); \
446 ((DEVI(dip)->devi_state & DEVI_BUS_DOWN) == DEVI_BUS_DOWN)
449 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
450 DEVI(dip)->devi_state &= ~DEVI_BUS_DOWN; \
451 DEVI(dip)->devi_state |= DEVI_S_REPORT; \
455 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
456 DEVI(dip)->devi_state |= (DEVI_BUS_DOWN | DEVI_S_REPORT); \
461 ((DEVI(dip)->devi_state & DEVI_S_REPORT) == DEVI_S_REPORT)
464 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
465 DEVI(dip)->devi_state |= DEVI_S_REPORT; \
469 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
470 DEVI(dip)->devi_state &= ~DEVI_S_REPORT; \
475 ((DEVI(dip)->devi_state & DEVI_NDI_CONFIG) == DEVI_NDI_CONFIG)
478 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
479 DEVI(dip)->devi_state |= DEVI_NDI_CONFIG; \
483 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
484 DEVI(dip)->devi_state &= ~DEVI_NDI_CONFIG; \
489 ((DEVI(dip)->devi_state & DEVI_S_ATTACHING) == DEVI_S_ATTACHING)
492 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
493 DEVI(dip)->devi_state |= DEVI_S_ATTACHING; \
497 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
498 DEVI(dip)->devi_state &= ~DEVI_S_ATTACHING; \
502 ((DEVI(dip)->devi_state & DEVI_S_DETACHING) == DEVI_S_DETACHING)
505 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
506 DEVI(dip)->devi_state |= DEVI_S_DETACHING; \
510 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
511 DEVI(dip)->devi_state &= ~DEVI_S_DETACHING; \
516 ((DEVI(dip)->devi_state & DEVI_S_ONLINING) == DEVI_S_ONLINING)
519 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
520 DEVI(dip)->devi_state |= DEVI_S_ONLINING; \
524 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
525 DEVI(dip)->devi_state &= ~DEVI_S_ONLINING; \
529 ((DEVI(dip)->devi_state & DEVI_S_OFFLINING) == DEVI_S_OFFLINING)
532 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
533 DEVI(dip)->devi_state |= DEVI_S_OFFLINING; \
537 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
538 DEVI(dip)->devi_state &= ~DEVI_S_OFFLINING; \
542 (DEVI(dip)->devi_state & (DEVI_S_OFFLINING | DEVI_S_ONLINING))
546 ((DEVI(dip)->devi_state & DEVI_S_INVOKING_DACF) == DEVI_S_INVOKING_DACF)
549 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
550 DEVI(dip)->devi_state |= DEVI_S_INVOKING_DACF; \
554 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
555 DEVI(dip)->devi_state &= ~DEVI_S_INVOKING_DACF; \
560 ((DEVI(dip)->devi_state & DEVI_S_EVADD) == DEVI_S_EVADD)
563 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
564 DEVI(dip)->devi_state &= ~DEVI_S_EVREMOVE; \
565 DEVI(dip)->devi_state |= DEVI_S_EVADD; \
569 ((DEVI(dip)->devi_state & DEVI_S_EVREMOVE) == DEVI_S_EVREMOVE)
572 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
573 DEVI(dip)->devi_state &= ~DEVI_S_EVADD; \
574 DEVI(dip)->devi_state |= DEVI_S_EVREMOVE; \
578 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
579 DEVI(dip)->devi_state &= ~(DEVI_S_EVADD | DEVI_S_EVREMOVE); \
584 ((DEVI(dip)->devi_state & DEVI_S_NEED_RESET) == DEVI_S_NEED_RESET)
587 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
588 DEVI(dip)->devi_state |= DEVI_S_NEED_RESET; \
592 ASSERT(mutex_owned(&DEVI(dip)->devi_lock)); \
593 DEVI(dip)->devi_state &= ~DEVI_S_NEED_RESET; \
616 #define DEVI_BUSY_CHANGING(dip) (DEVI(dip)->devi_flags & DEVI_BUSY)
618 ((DEVI(dip))->devi_busy_thread == curthread))
620 #define DEVI_IS_PCI(dip) (DEVI(dip)->devi_flags & DEVI_PCI_DEVICE)
621 #define DEVI_SET_PCI(dip) (DEVI(dip)->devi_flags |= (DEVI_PCI_DEVICE))
732 (DEVI(dip)->devi_node_attributes & DDI_VHCI_NODE)
766 ((struct ddi_parent_private_data *)DEVI((d))->devi_parent_data)