hci1394_detach.c revision ef7b5c7be127922529d4730ee4458bb2b061e711
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* 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 */
/* unregister interrupt handler */
/* don't accept anymore commands from services layer */
/* 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 */
/* don't accept anymore commands from services layer */
/* Reset the OHCI HW */
/* Make sure async engine is ready to suspend */
"");
return (DDI_SUCCESS);
default:
break;
}
return (DDI_FAILURE);
}
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
{
"");
"");
}