Ejemplo n.º 1
0
/*
 * debug, log, and console message handling
 */
usb_log_handle_t
usb_alloc_log_hdl(dev_info_t *dip, char *name,
	uint_t *errlevel, uint_t *mask, uint_t *instance_filter,
	usb_flags_t flags)
{
	usba_log_handle_impl_t	*hdl;

	USBA_CHECK_CONTEXT();
	hdl = kmem_zalloc(sizeof (*hdl), KM_SLEEP);

	hdl->lh_dip = dip;
	if (dip && (name == NULL)) {
		hdl->lh_name = (char *)ddi_driver_name(dip);
	} else {
		hdl->lh_name = name;
	}
	hdl->lh_errlevel = errlevel;
	hdl->lh_mask = mask;
	hdl->lh_instance_filter = instance_filter;
	hdl->lh_flags = flags;

#ifdef __lock_lint
	(void) usb_alloc_log_handle(dip, name, errlevel, mask,
	    instance_filter, 0, flags);
	usb_free_log_handle(NULL);
#endif

	return ((usb_log_handle_t)hdl);
}
Ejemplo n.º 2
0
usb_log_handle_t
usba10_usb_alloc_log_handle(
	dev_info_t	*dip,
	char		*name,
	uint_t		*errlevel,
	uint_t		*mask,
	uint_t		*instance_filter,
	uint_t		show_label,
	usb_flags_t	flags)
{
	return (usb_alloc_log_handle(
	    dip, name, errlevel, mask, instance_filter, show_label, flags));
}