smp_state
smp_state_t *smp_state;
smp_state = ddi_get_soft_state(smp_soft_state, instance);
smp_state->smp_sd = smp_sd;
smp_log(smp_state, CE_NOTE,
mutex_init(&smp_state->smp_mutex, NULL, MUTEX_DRIVER, NULL);
smp_state->smp_open_flag = SMP_CLOSED;
smp_state_t *smp_state;
smp_state = ddi_get_soft_state(smp_soft_state, instance);
if (smp_state == NULL) {
smp_state_t *smp_state;
smp_state = ddi_get_soft_state(smp_soft_state, instance);
mutex_destroy(&smp_state->smp_mutex);
smp_state_t *smp_state;
if ((smp_state = ddi_get_soft_state(smp_soft_state, instance))
mutex_enter(&smp_state->smp_mutex);
if (smp_state->smp_open_flag != SMP_CLOSED) {
smp_state->smp_open_flag = SMP_EXOPENED;
if (smp_state->smp_open_flag == SMP_EXOPENED) {
smp_state->smp_open_flag = SMP_SOPENED;
mutex_exit(&smp_state->smp_mutex);
smp_state_t *smp_state;
if ((smp_state = ddi_get_soft_state(smp_soft_state, instance))
mutex_enter(&smp_state->smp_mutex);
if (smp_state->smp_open_flag == SMP_CLOSED) {
smp_log(smp_state, CE_NOTE, "!smp device is already in close");
smp_state->smp_open_flag = SMP_CLOSED;
mutex_exit(&smp_state->smp_mutex);
smp_state_t *smp_state;
if ((smp_state = ddi_get_soft_state(smp_soft_state, instance))
smp_pkt->smp_pkt_address = &smp_state->smp_sd->smp_sd_address;
mutex_enter(&smp_state->smp_mutex);
while (smp_state->smp_busy)
cv_wait(&smp_state->smp_cv,
&smp_state->smp_mutex);
smp_state->smp_busy = 1;
mutex_exit(&smp_state->smp_mutex);
mutex_enter(&smp_state->smp_mutex);
smp_state->smp_busy = 0;
cv_signal(&smp_state->smp_cv);
mutex_exit(&smp_state->smp_mutex);
smp_log(smp_state, CE_NOTE,
smp_log(smp_state, CE_NOTE,
smp_log(smp_state_t *smp_state, int level, const char *fmt, ...)
if (smp_state == (smp_state_t *)NULL) {
dip = smp_state->smp_sd->smp_sd_dev;