rem: "Fixed type interrupt is not supported");
add: "ddi_intr_get_supported_types failed");
context: ehci_register_intrs_and_init_mutex(ehci_state_t	*ehcip){	int type, count = 0, actual, ret;#if defined(__x86)	uint8_t iline;#endif	USB_DPRINTF_L4(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,	    "ehci_register_intrs_and_init_mutex:");#if defined(__x86)	/*	 * Make sure that the interrupt pin is connected to the	 * interrupt controller on x86.	 Interrupt line 255 means	 * "unknown" or "not connected" (PCI spec 6.2.4, footnote 43).	 * If we would return failure when interrupt line equals 255, then	 * high speed devices will be routed to companion host controllers.	 * However, it is not necessary to return failure here, and	 * o/uhci codes don't check the interrupt line either.	 * But it's good to log a message here for debug purposes.	 */	iline = pci_config_get8(ehcip->ehci_config_handle,	    PCI_CONF_ILINE);	if (iline == 255) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "interrupt line value out of range (%d)",		    iline);	}#endif	/* __x86 */	ret = ddi_intr_get_supported_types(ehcip->ehci_dip, &type);	if ((ret != DDI_SUCCESS) || (!(type & DDI_INTR_TYPE_FIXED))) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "Fixed type interrupt is not supported");		return (DDI_FAILURE);	}	ret = ddi_intr_get_nintrs(ehcip->ehci_dip, DDI_INTR_TYPE_FIXED, &count);	/*	 * Fixed interrupts can only have one interrupt. Check to make	 * sure that number of supported interrupts and number of	 * available interrupts are both equal to 1.	 */	if ((ret != DDI_SUCCESS) || (count != 1)) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "no fixed interrupts");		return (DDI_FAILURE);	}	ehcip->ehci_htable = kmem_zalloc(sizeof (ddi_intr_handle_t), KM_SLEEP);	ret = ddi_intr_alloc(ehcip->ehci_dip, ehcip->ehci_htable,	    DDI_INTR_TYPE_FIXED, 0, count, &actual, 0);	if ((ret != DDI_SUCCESS) || (actual != 1)) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "ddi_intr_alloc() failed 0x%x", ret);		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));		return (DDI_FAILURE);	}	/* Sanity check that count and avail are the same. */	ASSERT(count == actual);	if (ddi_intr_get_pri(ehcip->ehci_htable[0], &ehcip->ehci_intr_pri)) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "ddi_intr_get_pri() failed");		(void) ddi_intr_free(ehcip->ehci_htable[0]);		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));		return (DDI_FAILURE);	}	USB_DPRINTF_L4(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,	    "Supported Interrupt priority = 0x%x", ehcip->ehci_intr_pri);	/* Test for high level mutex */	if (ehcip->ehci_intr_pri >= ddi_intr_get_hilevel_pri()) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "Hi level interrupt not supported");		(void) ddi_intr_free(ehcip->ehci_htable[0]);		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));		return (DDI_FAILURE);	}	/* Initialize the mutex */	mutex_init(&ehcip->ehci_int_mutex, NULL, MUTEX_DRIVER,	    DDI_INTR_PRI(ehcip->ehci_intr_pri));	if (ddi_intr_add_handler(ehcip->ehci_htable[0],	    (ddi_intr_handler_t *)ehci_intr, (caddr_t)ehcip, NULL) !=		DDI_SUCCESS) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "ddi_intr_add_handler() failed");		mutex_destroy(&ehcip->ehci_int_mutex);		(void) ddi_intr_free(ehcip->ehci_htable[0]);		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));		return (DDI_FAILURE);	}	if (ddi_intr_enable(ehcip->ehci_htable[0]) != DDI_SUCCESS) {		USB_DPRINTF_L2(PRINT_MASK_ATTA, ehcip->ehci_log_hdl,		    "ehci_register_intrs_and_init_mutex: "		    "ddi_intr_enable() failed");		(void) ddi_intr_remove_handler(ehcip->ehci_htable[0]);		mutex_destroy(&ehcip->ehci_int_mutex);		(void) ddi_intr_free(ehcip->ehci_htable[0]);		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));		return (DDI_FAILURE);	}	/* Create prototype for advance on async schedule */	cv_init(&ehcip->ehci_async_schedule_advance_cv,	    NULL, CV_DRIVER, NULL);	return (DDI_SUCCESS);}