add: Set_OpReg(ehci_config_flag, EHCI_CONFIG_FLAG_CLASSIC);
context: ehci_cleanup(ehci_state_t	*ehcip){	ehci_trans_wrapper_t	*tw;	ehci_pipe_private_t	*pp;	ehci_qtd_t		*qtd;	int			i, ctrl, rval;	int			flags = ehcip->ehci_flags;	USB_DPRINTF_L4(PRINT_MASK_ATTA, ehcip->ehci_log_hdl, "ehci_cleanup:");	if (flags & EHCI_RHREG) {		/* Unload the root hub driver */		if (ehci_unload_root_hub_driver(ehcip) != USB_SUCCESS) {			return (DDI_FAILURE);		}	}	if (flags & EHCI_USBAREG) {		/* Unregister this HCD instance with USBA */		usba_hcdi_unregister(ehcip->ehci_dip);	}	if (flags & EHCI_INTR) {		mutex_enter(&ehcip->ehci_int_mutex);		/* Route all Root hub ports to Classic host controller */		Set_OpReg(ehci_config_flag, EHCI_CONFIG_FLAG_CLASSIC);		/* Disable all EHCI QH list processing */		Set_OpReg(ehci_command, (Get_OpReg(ehci_command) &		    ~(EHCI_CMD_ASYNC_SCHED_ENABLE |		    EHCI_CMD_PERIODIC_SCHED_ENABLE)));		/* Disable all EHCI interrupts */		Set_OpReg(ehci_interrupt, 0);		/* wait for the next SOF */		(void) ehci_wait_for_sof(ehcip);		/* Stop the EHCI host controller */		Set_OpReg(ehci_command,		    Get_OpReg(ehci_command) & ~EHCI_CMD_HOST_CTRL_RUN);		/* Wait for sometime */		drv_usecwait(EHCI_TIMEWAIT);		mutex_exit(&ehcip->ehci_int_mutex);		/* disable interrupt */		(void) ddi_intr_disable(ehcip->ehci_htable[0]);		/* Remove interrupt handler */		(void) ddi_intr_remove_handler(ehcip->ehci_htable[0]);		/* free interrupt handle */		(void) ddi_intr_free(ehcip->ehci_htable[0]);		/* free memory */		kmem_free(ehcip->ehci_htable, sizeof (ddi_intr_handle_t));	}	/* Unmap the EHCI registers */	if (ehcip->ehci_caps_handle) {		ddi_regs_map_free(&ehcip->ehci_caps_handle);	}	if (ehcip->ehci_config_handle) {		pci_config_teardown(&ehcip->ehci_config_handle);	}	/* Free all the buffers */	if (ehcip->ehci_qtd_pool_addr && ehcip->ehci_qtd_pool_mem_handle) {		for (i = 0; i < ehci_qtd_pool_size; i ++) {			qtd = &ehcip->ehci_qtd_pool_addr[i];			ctrl = Get_QTD(ehcip->			    ehci_qtd_pool_addr[i].qtd_state);			if ((ctrl != EHCI_QTD_FREE) &&			    (ctrl != EHCI_QTD_DUMMY) &&			    (qtd->qtd_trans_wrapper)) {				mutex_enter(&ehcip->ehci_int_mutex);				tw = (ehci_trans_wrapper_t *)					EHCI_LOOKUP_ID((uint32_t)					Get_QTD(qtd->qtd_trans_wrapper));				/* Obtain the pipe private structure */				pp = tw->tw_pipe_private;				/* Stop the the transfer timer */				ehci_stop_xfer_timer(ehcip, tw,						EHCI_REMOVE_XFER_ALWAYS);				ehci_deallocate_tw(ehcip, pp, tw);				mutex_exit(&ehcip->ehci_int_mutex);			}		}		/*		 * If EHCI_QTD_POOL_BOUND flag is set, then unbind		 * the handle for QTD pools.		 */		if ((ehcip->ehci_dma_addr_bind_flag &		    EHCI_QTD_POOL_BOUND) == EHCI_QTD_POOL_BOUND) {			rval = ddi_dma_unbind_handle(			    ehcip->ehci_qtd_pool_dma_handle);			ASSERT(rval == DDI_SUCCESS);		}		ddi_dma_mem_free(&ehcip->ehci_qtd_pool_mem_handle);	}	/* Free the QTD pool */	if (ehcip->ehci_qtd_pool_dma_handle) {		ddi_dma_free_handle(&ehcip->ehci_qtd_pool_dma_handle);	}	if (ehcip->ehci_qh_pool_addr && ehcip->ehci_qh_pool_mem_handle) {		/*		 * If EHCI_QH_POOL_BOUND flag is set, then unbind		 * the handle for QH pools.		 */		if ((ehcip->ehci_dma_addr_bind_flag &		    EHCI_QH_POOL_BOUND) == EHCI_QH_POOL_BOUND) {			rval = ddi_dma_unbind_handle(			    ehcip->ehci_qh_pool_dma_handle);			ASSERT(rval == DDI_SUCCESS);		}		ddi_dma_mem_free(&ehcip->ehci_qh_pool_mem_handle);	}	/* Free the QH pool */	if (ehcip->ehci_qh_pool_dma_handle) {		ddi_dma_free_handle(&ehcip->ehci_qh_pool_dma_handle);	}	/* Free the Periodic frame list table (PFLT) area */	if (ehcip->ehci_periodic_frame_list_tablep &&	    ehcip->ehci_pflt_mem_handle) {		/*		 * If EHCI_PFLT_DMA_BOUND flag is set, then unbind		 * the handle for PFLT.		 */		if ((ehcip->ehci_dma_addr_bind_flag &		    EHCI_PFLT_DMA_BOUND) == EHCI_PFLT_DMA_BOUND) {			rval = ddi_dma_unbind_handle(			    ehcip->ehci_pflt_dma_handle);			ASSERT(rval == DDI_SUCCESS);		}		ddi_dma_mem_free(&ehcip->ehci_pflt_mem_handle);	}	(void) ehci_isoc_cleanup(ehcip);	if (ehcip->ehci_pflt_dma_handle) {		ddi_dma_free_handle(&ehcip->ehci_pflt_dma_handle);	}	if (flags & EHCI_INTR) {		/* Destroy the mutex */		mutex_destroy(&ehcip->ehci_int_mutex);		/* Destroy the async schedule advance condition variable */		cv_destroy(&ehcip->ehci_async_schedule_advance_cv);	}	/* clean up kstat structs */	ehci_destroy_stats(ehcip);	/* Free ehci hcdi ops */	if (ehcip->ehci_hcdi_ops) {		usba_free_hcdi_ops(ehcip->ehci_hcdi_ops);	}	if (flags & EHCI_ZALLOC) {		usb_free_log_hdl(ehcip->ehci_log_hdl);		/* Remove all properties that might have been created */		ddi_prop_remove_all(ehcip->ehci_dip);		/* Free the soft state */		ddi_soft_state_free(ehci_statep,			ddi_get_instance(ehcip->ehci_dip));	}	return (DDI_SUCCESS);}