/* * nx1394_add_eventcall() * This gets called when a child node calls ddi_add_eventcall(). Registers * the specified callback for the requested event cookie with the ndi * event framework. * dip is the hal dip. This routine calls ndi_event_add_callback(), * allowing requests for events we don't generate to pass up the tree. */ static int nx1394_add_eventcall(dev_info_t *dip, dev_info_t *rdip, ddi_eventcookie_t cookie, void (*callback)(), void *arg, ddi_callback_id_t *cb_id) { int ret; s1394_hal_t *hal; #if defined(DEBUG) char *event_name = NULL; #endif hal = s1394_dip_to_hal(dip); ASSERT(hal); TNF_PROBE_0_DEBUG(nx1394_add_eventcall_enter, S1394_TNF_SL_NEXUS_STACK, ""); ret = ndi_event_add_callback(hal->hal_ndi_event_hdl, rdip, cookie, callback, arg, NDI_NOSLEEP, cb_id); #if defined(DEBUG) event_name = ndi_event_cookie_to_name(hal->hal_ndi_event_hdl, cookie); if (event_name == NULL) event_name = ""; #endif TNF_PROBE_4_DEBUG(nx1394_add_eventcall_exit, S1394_TNF_SL_NEXUS_STACK, "", tnf_opaque, parent_dip, (void *)dip, tnf_opaque, requestor_dip, (void *)rdip, tnf_string, event_name, event_name, tnf_int, request_status, ret); return (ret); }
/*ARGSUSED*/ static int eibnx_add_eventcall(dev_info_t *dip, dev_info_t *rdip, ddi_eventcookie_t cookie, void (*callback)(dev_info_t *cb_dip, ddi_eventcookie_t cb_cookie, void *cb_arg, void *cb_impl_data), void *arg, ddi_callback_id_t *cb_id) { return (ndi_event_add_callback(enx_ndi_event_hdl, rdip, cookie, callback, arg, NDI_SLEEP, cb_id)); }