Lines Matching refs:dev
93 #define LI_HASH(mid, dip, dev) (ident_hash_func(mid, dip, dev) % LI_HASH_SZ)
178 ident_hash_func(modid_t modid, dev_info_t *dip, dev_t dev)
184 } else if (dev != DDI_DEV_T_NONE) {
185 return (modid + getminor(dev) + getmajor(dev));
192 ident_find_ref_nolock(modid_t modid, dev_info_t *dip, dev_t dev, major_t major)
195 uint_t index = LI_HASH(modid, dip, dev);
205 ((*lipp)->li_dev == dev))
214 ident_alloc(char *mod_name, dev_info_t *dip, dev_t dev, major_t major)
230 index = LI_HASH(modid, dip, dev);
232 lipp = ident_find_ref_nolock(modid, dip, dev, major);
250 lip->li_dev = dev;
517 ldi_vp_from_dev(dev_t dev, int otyp, vnode_t **vpp)
523 if ((dev == DDI_DEV_T_NONE) || (!OTYP_VALID(otyp)) || (vpp == NULL))
526 if ((dip = e_ddi_hold_devi_by_dev(dev, 0)) == NULL)
529 vp = makespecvp(dev, OTYP_TO_VTYP(otyp));
580 dev_t dev;
601 ret = resolve_pathname(path, &dip, &dev, &spec_type);
606 vp = makespecvp(dev, STYP_TO_VTYP(spec_type));
616 ldi_devid_match(ddi_devid_t devid, dev_info_t *dip, dev_t dev)
650 propp = i_ddi_prop_search(dev,
679 dev_t dev, *devs;
690 dev = devs[i];
692 if ((dip = e_ddi_hold_devi_by_dev(dev, 0)) == NULL)
709 ldi_devid_match(devid, dip, dev))
721 vp = makespecvp(dev, STYP_TO_VTYP(styp));
783 i_ldi_prop_op(dev_t dev, dev_info_t *dip, ddi_prop_op_t prop_op,
814 dev = DDI_DEV_T_ANY;
817 res = cdev_prop_op(dev, dip, prop_op, flags, name, valuep, lengthp);
845 i_ldi_prop_op_typed(dev_t dev, dev_info_t *dip, int flags, char *name,
858 res = i_ldi_prop_op(dev, dip, PROP_LEN,
885 res = i_ldi_prop_op(dev, dip, PROP_LEN_AND_VAL_BUF,
1000 dev_t dev;
1005 dev = vp->v_rdev;
1011 } else if (dev != DDI_DEV_T_NONE) {
1012 dip = e_ddi_hold_devi_by_dev(dev, 0);
1016 ldi_usage->tgt_name = mod_major_to_name(getmajor(dev));
1018 ldi_usage->tgt_devt = dev;
1032 dev_t dev;
1039 dev = lip->li_dev;
1045 } else if (dev != DDI_DEV_T_NONE) {
1046 dip = e_ddi_hold_devi_by_dev(dev, 0);
1052 ldi_usage.src_devt = dev;
1064 if (((lip->li_major == -1) && (dev == DDI_DEV_T_NONE)) ||
1120 if (dev != DDI_DEV_T_NONE)
1121 major = getmajor(dev);
1472 dev_t dev;
1484 dev = stp->sd_vnode->v_rdev;
1485 name = mod_major_to_name(getmajor(dev));
1488 *lip = (ldi_ident_t)ident_alloc(name, NULL, dev, -1);
1492 "ldi_ident_from_stream", (void *)*lip, name, getminor(dev),
1499 ldi_ident_from_dev(dev_t dev, ldi_ident_t *lip)
1508 name = mod_major_to_name(getmajor(dev));
1511 *lip = (ldi_ident_t)ident_alloc(name, NULL, dev, -1);
1515 "ldi_ident_from_dev", (void *)*lip, name, getminor(dev)));
1765 dev_t dev;
1772 dev = vp->v_rdev;
1774 ret = cdev_read(dev, uiop, credp);
1788 dev_t dev;
1795 dev = vp->v_rdev;
1797 ret = cdev_write(dev, uiop, credp);
1922 dev_t dev;
1943 dev = vp->v_rdev;
1945 ret = cdev_ioctl(dev, cmd, arg, mode, cr, rvalp);
1972 dev_t dev;
1979 dev = vp->v_rdev;
1981 ret = cdev_poll(dev, events, anyyet, reventsp, phpp);
1996 dev_t dev;
2014 dev = handlep->lh_vp->v_rdev;
2022 dip = e_ddi_hold_devi_by_dev(dev, 0);
2027 ret = i_ldi_prop_op(dev, dip, prop_op, flags, name, valuep, length);
2037 dev_t dev;
2043 dev = handlep->lh_vp->v_rdev;
2047 bp->b_edev = dev;
2048 bp->b_dev = cmpdev(dev);
2056 dev_t dev;
2062 dev = handlep->lh_vp->v_rdev;
2066 return (bdev_dump(dev, addr, blkno, nblk));
2074 dev_t dev;
2080 dev = handlep->lh_vp->v_rdev;
2084 return (cdev_devmap(dev, dhp, off, len, maplen, model));
2091 dev_t dev;
2104 dev = handlep->lh_vp->v_rdev;
2105 cb = devopsp[getmajor(dev)]->devo_cb_ops;
2112 return (cb->cb_aread(dev, aio_reqp, cr));
2120 dev_t dev;
2132 dev = handlep->lh_vp->v_rdev;
2133 cb = devopsp[getmajor(dev)]->devo_cb_ops;
2140 return (cb->cb_awrite(dev, aio_reqp, cr));
2233 dev_t dev;
2238 dev = handlep->lh_vp->v_rdev;
2240 ret = ddi_lyr_get_devid(dev, devid);
2252 dev_t dev;
2257 dev = handlep->lh_vp->v_rdev;
2260 ret = ddi_lyr_get_minor_name(dev, OTYP_TO_STYP(otyp), minor_name);
2273 dev_t dev;
2280 dev = handlep->lh_vp->v_rdev;
2288 dip = e_ddi_hold_devi_by_dev(dev, 0);
2294 dev = DDI_DEV_T_ANY;
2300 res = i_ldi_prop_op_typed(dev, dip, flags, name,
2314 res = ddi_prop_lookup_int_array(dev, dip, flags,
2329 dev_t dev;
2336 dev = handlep->lh_vp->v_rdev;
2344 dip = e_ddi_hold_devi_by_dev(dev, 0);
2350 dev = DDI_DEV_T_ANY;
2357 res = i_ldi_prop_op_typed(dev, dip, flags, name,
2371 res = ddi_prop_lookup_int64_array(dev, dip, flags,
2386 dev_t dev;
2393 dev = handlep->lh_vp->v_rdev;
2401 dip = e_ddi_hold_devi_by_dev(dev, 0);
2407 dev = DDI_DEV_T_ANY;
2414 res = i_ldi_prop_op_typed(dev, dip, flags, name,
2446 res = ddi_prop_lookup_string_array(dev, dip, flags,
2461 dev_t dev;
2468 dev = handlep->lh_vp->v_rdev;
2476 dip = e_ddi_hold_devi_by_dev(dev, 0);
2482 dev = DDI_DEV_T_ANY;
2489 res = i_ldi_prop_op_typed(dev, dip, flags, name,
2508 res = ddi_prop_lookup_string(dev, dip, flags, name, data);
2539 dev_t dev;
2546 dev = handlep->lh_vp->v_rdev;
2554 dip = e_ddi_hold_devi_by_dev(dev, 0);
2560 dev = DDI_DEV_T_ANY;
2567 res = i_ldi_prop_op_typed(dev, dip, flags, name,
2581 res = ddi_prop_lookup_byte_array(dev, dip, flags,
2596 dev_t dev;
2603 dev = handlep->lh_vp->v_rdev;
2611 dip = e_ddi_hold_devi_by_dev(dev, 0);
2617 dev = DDI_DEV_T_ANY;
2629 res = i_ldi_prop_op(dev, dip, PROP_LEN_AND_VAL_BUF,
2643 res = ddi_prop_get_int(dev, dip, flags, name, defvalue);
2657 dev_t dev;
2664 dev = handlep->lh_vp->v_rdev;
2672 dip = e_ddi_hold_devi_by_dev(dev, 0);
2678 dev = DDI_DEV_T_ANY;
2690 res = i_ldi_prop_op(dev, dip, PROP_LEN_AND_VAL_BUF,
2704 res = ddi_prop_get_int64(dev, dip, flags, name, defvalue);
2717 dev_t dev;
2724 dev = handlep->lh_vp->v_rdev;
2732 dip = e_ddi_hold_devi_by_dev(dev, 0);
2740 dev = DDI_DEV_T_ANY;
2747 res = i_ldi_prop_op(dev, dip, PROP_LEN,
2756 res = ddi_prop_exists(dev, dip, flags, name);
2769 dev_t dev;
2780 dev = handlep->lh_vp->v_rdev;
2788 dip = e_ddi_hold_devi_by_dev(dev, 0);
2811 dev_t dev;
2820 dev = handlep->lh_vp->v_rdev;
2828 dip = e_ddi_hold_devi_by_dev(dev, 0);
3071 dev_t dev;
3102 dev = handlep->lh_vp->v_rdev;
3110 dip = e_ddi_hold_devi_by_dev(dev, 0);
3162 dev_t dev;
3186 dev = lhp->lh_vp->v_rdev;
3193 dip = e_ddi_hold_devi_by_dev(dev, 0);
3269 dev_t dev, int spec_type)
3273 ASSERT(dev != DDI_DEV_T_NONE);
3274 ASSERT(dev != NODEV);
3275 ASSERT((dev == DDI_DEV_T_ANY && spec_type == 0) ||
3286 if (dev != DDI_DEV_T_ANY) {
3287 if (dev != lecp->lec_dev || spec_type != lecp->lec_spec)
3310 ldi_invoke_notify(dev_info_t *dip, dev_t dev, int spec_type, char *event,
3319 ASSERT(dev != DDI_DEV_T_NONE);
3320 ASSERT(dev != NODEV);
3321 ASSERT((dev == DDI_DEV_T_ANY && spec_type == 0) ||
3336 if (!ldi_ev_device_match(lecp, dip, dev, spec_type))
3394 if (!ldi_ev_device_match(lecp, dip, dev, spec_type))
3464 dev_t dev;
3491 dev = makedevice(major, minor);
3499 retc = contract_device_negotiate(dip, dev, spec_type, ct_evtype);
3506 retl = ldi_invoke_notify(dip, dev, spec_type, evname, ev_data);
3510 contract_device_negend(dip, dev, spec_type, CT_EV_FAILURE);
3534 ldi_invoke_finalize(dev_info_t *dip, dev_t dev, int spec_type, char *event,
3543 ASSERT(dev != DDI_DEV_T_NONE);
3544 ASSERT(dev != NODEV);
3545 ASSERT((dev == DDI_DEV_T_ANY && spec_type == 0) ||
3567 if (!ldi_ev_device_match(lecp, dip, dev, spec_type))
3627 dev_t dev;
3650 dev = makedevice(major, minor);
3656 contract_device_finalize(dip, dev, spec_type, ct_evtype, ct_result);
3659 ldi_invoke_finalize(dip, dev, spec_type, evname, ldi_result, ev_data);