pcie.c revision f8d2de6bd2421da1926f3daa456d161670decdf7
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * CDDL HEADER START
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * The contents of this file are subject to the terms of the
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * Common Development and Distribution License, Version 1.0 only
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * (the "License"). You may not use this file except in compliance
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * with the License.
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * See the License for the specific language governing permissions
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * and limitations under the License.
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * When distributing Covered Code, include this CDDL HEADER in each
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * If applicable, add the following below this CDDL HEADER, with the
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * fields enclosed by brackets "[]" replaced with your own identifying
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * information: Portions Copyright [yyyy] [name of copyright owner]
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * CDDL HEADER END
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync * Use is subject to license terms.
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync#pragma ident "%Z%%M% %I% %E% SMI"
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsyncstatic uint16_t pcie_find_cap_reg(ddi_acc_handle_t config_handle,
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsyncstatic uint16_t pcie_find_ext_cap_reg(ddi_acc_handle_t config_handle,
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync#else /* DEBUG */
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync#endif /* DEBUG */
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsync/* Variable to control default PCI-Express config settings */
85fc7dbf8f928aea2a6fddde85a77950f69284ddvboxsyncushort_t pcie_command_default = PCI_COMM_SERR_ENABLE |
(void *)&modlmisc,
_init(void)
int rval;
return (rval);
_fini()
int rval;
return (rval);
return (DDI_FAILURE);
return (DDI_SUCCESS);
fail:
return (DDI_FAILURE);
static uint16_t
return (caps_ptr);
static uint16_t
return (PCIE_EXT_CAP_NEXT_PTR_NULL);
#ifdef DEBUG
int pcie_dbg_print = 0;
if (!pcie_debug_flags) {
if (servicing_interrupt()) {
if (pcie_dbg_print) {