Lines Matching defs:dip

50 ddi_intr_get_supported_types(dev_info_t *dip, int *typesp)
55 if (dip == NULL)
58 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_get_supported_types: dip %p\n",
59 (void *)dip));
61 if (*typesp = i_ddi_intr_get_supported_types(dip))
65 hdl.ih_dip = dip;
67 ret = i_ddi_intr_ops(dip, dip, DDI_INTROP_SUPPORTED_TYPES, &hdl,
86 ddi_intr_get_nintrs(dev_info_t *dip, int type, int *nintrsp)
91 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_get_nintrs: dip %p, type: %d\n",
92 (void *)dip, type));
94 if ((dip == NULL) || (nintrsp == NULL) ||
96 !(i_ddi_intr_get_supported_types(dip) & type)) {
102 if (*nintrsp = i_ddi_intr_get_supported_nintrs(dip, type))
106 hdl.ih_dip = dip;
109 ret = i_ddi_intr_ops(dip, dip, DDI_INTROP_NINTRS, &hdl,
128 ddi_intr_get_navail(dev_info_t *dip, int type, int *navailp)
130 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_get_navail: dip %p, type: %d\n",
131 (void *)dip, type));
133 if ((dip == NULL) || (navailp == NULL) ||
135 !(i_ddi_intr_get_supported_types(dip) & type)) {
141 if ((*navailp = i_ddi_intr_get_current_navail(dip, type)) == 0)
151 ddi_intr_alloc(dev_info_t *dip, ddi_intr_handle_t *h_array, int type, int inum,
158 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_alloc: name %s dip 0x%p "
159 "type %x inum %x count %x behavior %x\n", ddi_driver_name(dip),
160 (void *)dip, type, inum, count, behavior));
163 if ((dip == NULL) || (h_array == NULL) || (inum < 0) || (count < 1) ||
172 !(i_ddi_intr_get_supported_types(dip) & type)) {
180 (i_ddi_get_intr_handle(dip, inum) != NULL)) {
187 if ((nintrs = i_ddi_intr_get_supported_nintrs(dip, type)) == 0) {
188 if (ddi_intr_get_nintrs(dip, type, &nintrs) != DDI_SUCCESS) {
196 if ((curr_type = i_ddi_intr_get_current_type(dip)) != 0) {
199 curr_nintrs = i_ddi_intr_get_current_nintrs(dip);
236 i_ddi_intr_devi_init(dip);
237 if (i_ddi_irm_insert(dip, type, count) == DDI_EAGAIN) {
245 if (curr_nintrs && (i_ddi_irm_supported(dip, type) != DDI_SUCCESS))
246 (void) i_ddi_irm_modify(dip, count + curr_nintrs);
249 navail = i_ddi_intr_get_current_navail(dip, type);
266 i_ddi_intr_devi_fini(dip);
267 else if (i_ddi_irm_supported(dip, type) != DDI_SUCCESS)
268 (void) i_ddi_irm_modify(dip, curr_nintrs);
280 tmp_hdl.ih_dip = dip;
282 if (i_ddi_intr_ops(dip, dip, DDI_INTROP_ALLOC,
286 i_ddi_intr_devi_fini(dip);
290 if ((ret = i_ddi_intr_ops(dip, dip, DDI_INTROP_GETPRI,
299 if ((ret = i_ddi_intr_ops(dip, dip, DDI_INTROP_GETCAP,
309 i_ddi_intr_set_current_type(dip, type);
310 i_ddi_intr_set_supported_nintrs(dip, nintrs);
311 i_ddi_intr_set_current_nintrs(dip,
312 i_ddi_intr_get_current_nintrs(dip) + *actualp);
325 hdlp->ih_dip = dip;
329 i_ddi_set_intr_handle(dip, hdlp->ih_inum,
341 i_ddi_intr_devi_fini(dip);
1000 ddi_intr_set_nreq(dev_info_t *dip, int nreq)
1004 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_set_nreq: dip %p, nreq %d\n",
1005 (void *)dip, nreq));
1007 ASSERT(dip != NULL);
1011 if ((dip == NULL) || (nreq < 1))
1014 curr_type = i_ddi_intr_get_current_type(dip);
1018 (i_ddi_irm_supported(dip, curr_type) != DDI_SUCCESS))
1022 if (ddi_intr_get_nintrs(dip, curr_type, &nintrs) != DDI_SUCCESS)
1027 return (i_ddi_irm_modify(dip, nreq));
1038 ddi_intr_add_softint(dev_info_t *dip, ddi_softint_handle_t *h_p, int soft_pri,
1044 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_add_softint: dip = %p, "
1045 "softpri = 0x%x\n", (void *)dip, soft_pri));
1047 if ((dip == NULL) || (h_p == NULL) || (handler == NULL)) {
1069 hdlp->ih_dip = dip;
1201 ddi_intr_hilevel(dev_info_t *dip, uint_t inumber)
1209 DDI_INTR_APIDBG((CE_CONT, "ddi_intr_hilevel: name=%s%d dip=0x%p "
1210 "inum=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1211 (void *)dip, inumber));
1218 if ((hdl = i_ddi_get_intr_handle(dip, inumber)) == NULL) {
1221 if ((ret = ddi_intr_alloc(dip, hdl_p, DDI_INTR_TYPE_FIXED,
1256 ddi_dev_nintrs(dev_info_t *dip, int *result)
1258 DDI_INTR_APIDBG((CE_CONT, "ddi_dev_nintrs: name=%s%d dip=0x%p\n",
1259 ddi_driver_name(dip), ddi_get_instance(dip), (void *)dip));
1261 if (ddi_intr_get_nintrs(dip, DDI_INTR_TYPE_FIXED,
1272 ddi_get_iblock_cookie(dev_info_t *dip, uint_t inumber,
1281 DDI_INTR_APIDBG((CE_CONT, "ddi_get_iblock_cookie: name=%s%d dip=0x%p "
1282 "inum=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1283 (void *)dip, inumber));
1292 if ((hdl = i_ddi_get_intr_handle(dip, inumber)) == NULL) {
1295 if ((ret = ddi_intr_alloc(dip, hdl_p,
1326 ddi_add_intr(dev_info_t *dip, uint_t inumber,
1337 DDI_INTR_APIDBG((CE_CONT, "ddi_add_intr: name=%s%d dip=0x%p "
1338 "inum=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1339 (void *)dip, inumber));
1344 if ((ret = ddi_intr_alloc(dip, hdl_p, DDI_INTR_TYPE_FIXED,
1393 ddi_add_fastintr(dev_info_t *dip, uint_t inumber,
1398 DDI_INTR_APIDBG((CE_CONT, "ddi_add_fastintr: name=%s%d dip=0x%p "
1399 "inum=0x%x: Not supported, return failure\n", ddi_driver_name(dip),
1400 ddi_get_instance(dip), (void *)dip, inumber));
1407 ddi_remove_intr(dev_info_t *dip, uint_t inum, ddi_iblock_cookie_t iblock_cookie)
1412 DDI_INTR_APIDBG((CE_CONT, "ddi_remove_intr: name=%s%d dip=0x%p "
1413 "inum=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1414 (void *)dip, inum));
1416 if ((hdl = i_ddi_get_intr_handle(dip, inum)) == NULL) {
1443 ddi_get_soft_iblock_cookie(dev_info_t *dip, int preference,
1447 "dip=0x%p pref=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1448 (void *)dip, preference));
1463 ddi_add_softintr(dev_info_t *dip, int preference, ddi_softintr_t *idp,
1473 DDI_INTR_APIDBG((CE_CONT, "ddi_add_softintr: name=%s%d dip=0x%p "
1474 "pref=0x%x\n", ddi_driver_name(dip), ddi_get_instance(dip),
1475 (void *)dip, preference));
1494 if ((ret = ddi_intr_add_softint(dip, hdl_p, softpri,
1514 DDI_INTR_APIDBG((CE_CONT, "ddi_add_softintr: dip = 0x%p, "
1515 "idp = 0x%p, ret = %x\n", (void *)dip, (void *)*idp, ret));