Lines Matching refs:ip
51 dr_init_io_unit(dr_io_unit_t *ip) in dr_init_io_unit() argument
55 if (DR_DEV_IS_ATTACHED(&ip->sbi_cm)) { in dr_init_io_unit()
57 ip->sbi_cm.sbdev_cond = SBD_COND_OK; in dr_init_io_unit()
58 } else if (DR_DEV_IS_PRESENT(&ip->sbi_cm)) { in dr_init_io_unit()
60 ip->sbi_cm.sbdev_cond = SBD_COND_OK; in dr_init_io_unit()
64 dr_device_transition(&ip->sbi_cm, new_state); in dr_init_io_unit()
109 dr_disconnect_io(dr_io_unit_t *ip) in dr_disconnect_io() argument
145 dr_io_unit_t *ip = (dr_io_unit_t *)devlist[i]; in dr_check_io_refs() local
151 err = drmach_get_dip(ip->sbi_cm.sbdev_id, &dip); in dr_check_io_refs()
153 DRERR_SET_C(&ip->sbi_cm.sbdev_error, &err); in dr_check_io_refs()
172 dr_dev_err(CE_WARN, &ip->sbi_cm, ESBD_BUSY); in dr_check_io_refs()
179 f, (uint_t)(uintptr_t)ip->sbi_cm.sbdev_id); in dr_check_io_refs()
197 dr_io_unit_t *ip = (dr_io_unit_t *)devlist[d]; in dr_pre_release_io() local
200 ip->sbi_cm.sbdev_id)) != 0) { in dr_pre_release_io()
206 dr_io_unit_t *ip = (dr_io_unit_t *)devlist[d]; in dr_pre_release_io() local
209 err = drmach_release(ip->sbi_cm.sbdev_id); in dr_pre_release_io()
211 DRERR_SET_C(&ip->sbi_cm.sbdev_error, in dr_pre_release_io()
223 dr_io_unit_t *ip = (dr_io_unit_t *)devlist[d]; in dr_pre_release_io() local
225 err = drmach_io_unrelease(ip->sbi_cm.sbdev_id); in dr_pre_release_io()
227 DRERR_SET_C(&ip->sbi_cm.sbdev_error, &err); in dr_pre_release_io()
275 dr_get_comp_cond(dr_io_unit_t *ip, dev_info_t *dip) in dr_get_comp_cond() argument
278 ip->sbi_cm.sbdev_cond = SBD_COND_UNKNOWN; in dr_get_comp_cond()
283 ip->sbi_cm.sbdev_cond = SBD_COND_FAILED; in dr_get_comp_cond()
287 if (DR_DEV_IS_ATTACHED(&ip->sbi_cm)) { in dr_get_comp_cond()
288 ip->sbi_cm.sbdev_cond = SBD_COND_OK; in dr_get_comp_cond()
289 } else if (DR_DEV_IS_PRESENT(&ip->sbi_cm)) { in dr_get_comp_cond()
290 ip->sbi_cm.sbdev_cond = SBD_COND_OK; in dr_get_comp_cond()
300 dr_io_unit_t *ip; in dr_io_status() local
318 ip = dr_get_io_unit(bp, i); in dr_io_status()
320 if (ip->sbi_cm.sbdev_state == DR_STATE_EMPTY) { in dr_io_status()
325 id = ip->sbi_cm.sbdev_id; in dr_io_status()
329 err = drmach_status(ip->sbi_cm.sbdev_id, &pstat); in dr_io_status()
331 DRERR_SET_C(&ip->sbi_cm.sbdev_error, &err); in dr_io_status()
348 isp->is_cm.c_id.c_type = ip->sbi_cm.sbdev_type; in dr_io_status()
349 isp->is_cm.c_id.c_unit = ip->sbi_cm.sbdev_unum; in dr_io_status()
353 dr_get_comp_cond(ip, dip); in dr_io_status()
354 isp->is_cm.c_cond = ip->sbi_cm.sbdev_cond; in dr_io_status()
355 isp->is_cm.c_busy = ip->sbi_cm.sbdev_busy | pstat.busy; in dr_io_status()
356 isp->is_cm.c_time = ip->sbi_cm.sbdev_time; in dr_io_status()
357 isp->is_cm.c_ostate = ip->sbi_cm.sbdev_ostate; in dr_io_status()