Print this page
LOCAL: devfs_clean before trying to offline to release refs to dev_info
*** 5888,5897 ****
--- 5888,5904 ----
&cookie) == NDI_SUCCESS)
(void) ndi_post_event(dip, dip, cookie, NULL);
}
}
+ /*
+ * dv_mknod places a hold on the dev_info_t for each devfs node
+ * created. If we're to succeed in detaching this device, we must
+ * first release all outstanding references held by devfs.
+ */
+ (void) devfs_clean(pdip, NULL, DV_CLEAN_FORCE);
+
if (i_ddi_detachchild(dip, flags) != DDI_SUCCESS) {
if (flags & NDI_DEVI_OFFLINE) {
RIO_DEBUG((CE_NOTE, "devi_detach_node: offline failed."
" Calling e_ddi_offline_finalize with result=%d. "
"dip=%p", DDI_FAILURE, (void *)dip));