hci1394_detach.c revision 193974072f41a843678abf5f61979c748687e66b
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* HBA detach() routine with associated funtions.
*/
int
{
if (soft_state == NULL) {
"");
return (DDI_FAILURE);
}
switch (cmd) {
case DDI_DETACH:
/* Don't allow the HW to generate any more interrupts */
/* Clear any pending interrupts - no longer valid */
/* Make sure we tell others on the bus we are dropping out */
0xFFFFFFFF);
/* unregister interrupt handler */
/* don't accept anymore commands from services layer */
/* Do a long reset on the bus so every one knows we are gone */
/* Reset the OHCI HW */
/* Flush out async DMA Q's (cancels pendingQ timeouts too) */
/* remove the minor node */
/* cleanup */
/* cleanup Solaris interrupt stuff */
/* cleanup soft state stuff */
/* free soft state */
"");
return (DDI_SUCCESS);
case DDI_SUSPEND:
/* Don't allow the HW to generate any more interrupts */
/* Clear any pending interrupts - no longer valid */
/* Make sure we tell others on the bus we are dropping out */
0xFFFFFFFF);
/* don't accept anymore commands from services layer */
/* Do a long reset on the bus so every one knows we are gone */
/* Reset the OHCI HW */
/* Make sure async engine is ready to suspend */
"");
return (DDI_SUCCESS);
default:
break;
}
return (DDI_FAILURE);
}
/*
* quiesce(9E) entry point.
*
* This function is called when the system is single-threaded at high
* PIL with preemption disabled. Therefore, this function must not be
* blocked.
*
* This function returns DDI_SUCCESS on success, or DDI_FAILURE on failure.
* DDI_FAILURE indicates an error condition and should almost never happen.
*/
int
{
if (soft_state == NULL) {
return (DDI_FAILURE);
}
/* Don't allow the HW to generate any more interrupts */
/* Clear any pending interrupts - no longer valid */
/* Make sure we tell others on the bus we are dropping out */
/* Do a long reset on the bus so every one knows we are gone */
/* Reset the OHCI HW */
return (DDI_SUCCESS);
}
void
{
"");
/* free up vendor specific registers */
/* cleanup isoch layer */
/* cleanup async layer */
/* Free up csr register space */
/* free up OpenHCI registers */
/* free up PCI config space */
"");
}
/*
* hci1394_pci_fini()
* Cleanup after a PCI init.
*/
void
{
}
/*
* hci1394_soft_state_fini()
* Cleanup any mutex's, etc. in soft_state.
*/
void
{
"");
"");
}