npe.c revision a2de976fd11ced5331ebe7c3a8ffbaf11f5427cf
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * CDDL HEADER START
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * The contents of this file are subject to the terms of the
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * Common Development and Distribution License (the "License").
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * You may not use this file except in compliance with the License.
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * or http://www.opensolaris.org/os/licensing.
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * See the License for the specific language governing permissions
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * and limitations under the License.
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * When distributing Covered Code, include this CDDL HEADER in each
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * If applicable, add the following below this CDDL HEADER, with the
c9beca4b724f480698592be6f34e05fec7a03d23Andrew Forrest * fields enclosed by brackets "[]" replaced with your own identifying
ah_platform_private)-> \
ddi_intr_handle_impl_t *, void *);
NULL,
NULL,
NULL,
(void *)&modldrv,
void *npe_statep;
_init(void)
_fini(void)
int rc;
if (rc != 0)
return (rc);
return (rc);
switch (cmd) {
case DDI_INFO_DEVT2INSTANCE:
case DDI_INFO_DEVT2DEVINFO:
return (ret);
return (DDI_SUCCESS);
return (DDI_FAILURE);
goto fail1;
goto fail2;
return (DDI_SUCCESS);
return (DDI_FAILURE);
switch (cmd) {
case DDI_DETACH:
return (DDI_FAILURE);
return (DDI_SUCCESS);
case DDI_SUSPEND:
return (DDI_SUCCESS);
return (DDI_FAILURE);
int ret;
DDI_SUCCESS) {
!= DDI_DEFAULT_ACC) {
return (ret);
int rnumber;
int length;
int space;
int retval;
case DDI_MT_REGSPEC:
return (DDI_FAILURE);
case DDI_MT_RNUMBER:
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_ME_INVAL);
switch (space) {
case PCI_ADDR_IO:
case PCI_ADDR_CONFIG:
!= DDI_DEFAULT_ACC) {
return (DDI_SUCCESS);
case PCI_ADDR_MEM64:
case PCI_ADDR_MEM32:
return (DDI_FAILURE);
if (len != 0)
return (retval);
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
if (len != 0)
switch (space) {
case PCI_ADDR_IO:
case PCI_ADDR_CONFIG:
case PCI_ADDR_MEM64:
return (DDI_FAILURE);
case PCI_ADDR_MEM32:
return (DDI_FAILURE);
return (retval);
int rn;
int totreg;
switch (ctlop) {
case DDI_CTLOPS_REPORTDEV:
return (DDI_FAILURE);
return (DDI_SUCCESS);
case DDI_CTLOPS_INITCHILD:
case DDI_CTLOPS_UNINITCHILD:
case DDI_CTLOPS_SIDDEV:
return (DDI_SUCCESS);
case DDI_CTLOPS_REGSIZE:
case DDI_CTLOPS_NREGS:
return (DDI_FAILURE);
*(int *)result = 0;
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
case DDI_CTLOPS_POWER:
return (DDI_SUCCESS);
case DDI_CTLOPS_PEEK:
case DDI_CTLOPS_POKE:
case DDI_CTLOPS_ATTACH:
return (DDI_SUCCESS);
(void *) dip);
return (DDI_SUCCESS);
case DDI_CTLOPS_DETACH:
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
return (DDI_FAILURE);
extern int pci_allow_pseudo_children;
DDI_SUCCESS) {
return (DDI_FAILURE);
if (pci_allow_pseudo_children) {
return (DDI_SUCCESS);
return (DDI_SUCCESS);
return (DDI_NOT_WELL_FORMED);
if (bus_p) {
return (DDI_SUCCESS);
return (DDI_SUCCESS);
int rv;
return (EINVAL);
return (ENXIO);
case PCI_TOOL_REG_MINOR_NUM:
case PCI_TOOL_INTR_MINOR_NUM:
return (rv);
return (EBUSY);
return (EBUSY);
int rv;
return (ENXIO);
case PCI_TOOL_REG_MINOR_NUM:
case PCI_TOOL_INTR_MINOR_NUM:
return (rv);
return (ENXIO);
case PCI_TOOL_REG_MINOR_NUM:
case PCI_TOOL_INTR_MINOR_NUM:
rvalp);
return (ret);
return (DDI_FM_OK);