cardbus_cfg.c revision 0d282d1376eb7ba06504448622a6d65726e4bd3e
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * CDDL HEADER START
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * The contents of this file are subject to the terms of the
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Common Development and Distribution License (the "License").
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * You may not use this file except in compliance with the License.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * or http://www.opensolaris.org/os/licensing.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * See the License for the specific language governing permissions
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * and limitations under the License.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * When distributing Covered Code, include this CDDL HEADER in each
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * If applicable, add the following below this CDDL HEADER, with the
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * fields enclosed by brackets "[]" replaced with your own identifying
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * information: Portions Copyright [yyyy] [name of copyright owner]
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * CDDL HEADER END
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Use is subject to license terms.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Copyright (c) * Copyright (c) 2001 Tadpole Technology plc
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * All rights reserved.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * From "@(#)pcicfg.c 1.31 99/06/18 SMI"
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#pragma ident "%Z%%M% %I% %E% SMI"
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Cardbus configurator
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * ************************************************************************
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * *** Implementation specific local data structures/definitions. ***
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * ************************************************************************
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic uint32_t pcicfg_max_device = PCICFG_MAX_DEVICE;
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic uint32_t pcicfg_max_function = PCICFG_MAX_FUNCTION;
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_HIADDR(n) ((uint32_t)(((uint64_t)(n) & 0xFFFFFFFF00000000)>> 32))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_LOADDR(n) ((uint32_t)((uint64_t)(n) & 0x00000000FFFFFFFF))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_LADDR(lo, hi) (((uint64_t)(hi) << 32) | (uint32_t)(lo))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_HIWORD(n) ((uint16_t)(((uint32_t)(n) & 0xFFFF0000)>> 16))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_LOWORD(n) ((uint16_t)((uint32_t)(n) & 0x0000FFFF))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_HIBYTE(n) ((uint8_t)(((uint16_t)(n) & 0xFF00)>> 8))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_LOBYTE(n) ((uint8_t)((uint16_t)(n) & 0x00FF))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_ROUND_UP(addr, gran) ((uintptr_t)((gran+addr-1)&(~(gran-1))))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_ROUND_DOWN(addr, gran) ((uintptr_t)((addr) & ~(gran-1)))
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_RANGE_LEN 2 /* Number of range entries */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * ISA node declaration structure.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#define PCICFG_MAKE_REG_HIGH(busnum, devnum, funcnum, register)\
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey dev_info_t *dip; /* Associated with the attach point */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey uint64_t memory_base; /* Memory base for this attach point */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey uint32_t io_base; /* I/O base for this attach point */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey uint_t highest_bus; /* Highest bus seen on the probe */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey ndi_ra_request_t mem_req; /* allocator request for memory */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey ndi_ra_request_t io_req; /* allocator request for I/O */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeytypedef struct {
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey dev_info_t *dip; /* Associated with the attach point */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey ddi_acc_handle_t handle; /* open handle on parent PCI config space */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey uint32_t io_base; /* I/O base for this attach point */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * forward declarations for routines defined in this module (called here)
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic cardbus_phdl_t *cardbus_find_phdl(dev_info_t *dip);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic cardbus_phdl_t *cardbus_create_phdl(dev_info_t *dip);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_destroy_phdl(dev_info_t *dip);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_program_ap(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_topbridge_assign(dev_info_t *, cardbus_phdl_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_bridge_ranges(dev_info_t *, cardbus_phdl_t *,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_bridge_assign(dev_info_t *, void *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_isa_bridge_ranges(dev_info_t *dip, cardbus_phdl_t *entry,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_add_isa_reg(dev_info_t *, void *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_allocate_chunk(dev_info_t *, uint8_t, uint8_t);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_free_chunk(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_setup_bridge(dev_info_t *, cardbus_phdl_t *,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_update_bridge(dev_info_t *, cardbus_phdl_t *,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_get_mem(dev_info_t *, cardbus_phdl_t *, uint32_t,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_get_io(dev_info_t *, cardbus_phdl_t *, uint32_t,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_sum_resources(dev_info_t *, void *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_free_bridge_resources(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_free_device_resources(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_free_resources(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_probe_bridge(cbus_t *, dev_info_t *, uint_t,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_probe_children(cbus_t *, dev_info_t *, uint_t, uint_t,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_add_config_reg(dev_info_t *, uint_t, uint_t, uint_t);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_add_isa_node(cbus_t *, dev_info_t *, struct isa_node *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_config_setup(dev_info_t *, ddi_acc_handle_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_config_teardown(ddi_acc_handle_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_reparent_children(dev_info_t *, dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_update_assigned_prop(dev_info_t *, pci_regspec_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_update_available_prop(dev_info_t *, uint32_t,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_update_ranges_prop(dev_info_t *, cardbus_range_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_update_reg_prop(dev_info_t *dip, uint32_t regvalue,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_set_standard_props(dev_info_t *parent, dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_set_isa_props(dev_info_t *parent, dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_set_busnode_props(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_set_busnode_isaprops(dev_info_t *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic int cardbus_set_childnode_props(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_set_bus_numbers(ddi_acc_handle_t config_handle,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void enable_pci_isa_bridge(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void enable_pci_pci_bridge(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void enable_cardbus_bridge(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void disable_pci_pci_bridge(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void disable_cardbus_bridge(dev_info_t *dip,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void enable_cardbus_device(dev_info_t *, ddi_acc_handle_t);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void disable_cardbus_device(ddi_acc_handle_t config_handle);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_force_boolprop(dev_info_t *dip, char *pname);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_force_intprop(dev_info_t *dip, char *pname,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_force_stringprop(dev_info_t *dip, char *pname,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void split_addr(char *, int *, int *);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_dump_common_config(ddi_acc_handle_t config_handle);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_dump_device_config(ddi_acc_handle_t config_handle);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_dump_bridge_config(ddi_acc_handle_t config_handle,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_dump_config(ddi_acc_handle_t config_handle);
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic void cardbus_dump_reg(dev_info_t *dip, const pci_regspec_t *regspec,
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic cardbus_phdl_t *cardbus_phdl_list = NULL;
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeystatic struct cardbus_name_entry cardbus_class_lookup [] = {
#ifndef _DONT_USE_1275_GENERIC_NAMES
return (intline);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
case PCICFG_FAILURE:
goto cleanup;
case PCICFG_NODEVICE:
goto cleanup;
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
return (rval);
static cardbus_phdl_t *
return (entry);
static cardbus_phdl_t *
return (new);
#ifdef _LP64
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
case PCI_HEADER_CARDBUS:
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
int count;
if (i == DDI_PROP_NOT_FOUND) {
sizeof (bus_range));
if (i != DDI_PROP_SUCCESS) {
return (DDI_WALK_TERMINATE);
return (DDI_WALK_TERMINATE);
return (DDI_WALK_TERMINATE);
return (DDI_WALK_PRUNECHILD);
int length;
int rcount;
int offset;
return (DDI_WALK_CONTINUE);
return (DDI_WALK_TERMINATE);
return (DDI_WALK_TERMINATE);
switch (sub_class) {
case PCI_BRIDGE_PCI:
goto bad_device;
case PCI_BRIDGE_ISA:
case PCI_BRIDGE_CARDBUS:
case PCI_BRIDGE_OTHER:
#ifdef sparc
return (DDI_WALK_TERMINATE);
for (i = 0; i < rcount; i++) {
offset);
offset);
return (DDI_WALK_TERMINATE);
return (DDI_WALK_TERMINATE);
#ifdef CARDBUS_DEBUG
return (DDI_WALK_CONTINUE);
int count;
int length;
int rcount;
#ifdef sparc
return (DDI_WALK_TERMINATE);
for (i = 0; i < rcount; i++) {
i = rcount;
return (DDI_WALK_TERMINATE);
sizeof (range)/sizeof (int));
return (DDI_WALK_PRUNECHILD);
int length;
return (DDI_WALK_CONTINUE);
return (DDI_WALK_CONTINUE);
reg[0] = 0;
if (io_reg) {
return (DDI_WALK_CONTINUE);
int count;
#ifdef _LP64
#ifdef _LP64
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
#ifdef _LP64
return (PCICFG_SUCCESS);
&k) != DDI_PROP_SUCCESS) {
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
#ifdef _LP64
#ifdef _LP64
#ifdef _LP64
#ifdef sparc
#ifdef _LP64
#ifdef sparc
#ifdef _LP64
if (length > 0) {
#ifdef _LP64
#ifdef _LP64
rlval);
rlval);
if (length > 0) {
#ifdef _LP64
#ifdef _LP64
rlval);
rlval);
#ifdef _LP64
if (ans) {
if (hole != 0) {
#ifdef _LP64
#ifdef _LP64
if (ans) {
if (hole != 0) {
int length;
int rcount;
int i, ret;
return (DDI_WALK_CONTINUE);
return (DDI_WALK_TERMINATE);
switch (sub_class) {
case PCI_BRIDGE_PCI:
== PCI_HEADER_PPB) {
PCI_BCNF_SECBUS)) {
#if defined(CARDBUS_DEBUG)
PCICFG_MEMGRAN)) {
#ifdef _LP64
PCICFG_IOGRAN)) {
#ifdef _LP64
(void *)entry);
#if defined(CARDBUS_DEBUG)
#ifdef _LP64
PCICFG_IOGRAN)) {
#ifdef _LP64
return (DDI_WALK_PRUNECHILD);
case PCI_BRIDGE_CARDBUS:
case PCI_BRIDGE_ISA:
return (DDI_WALK_TERMINATE);
for (i = 0; i < rcount; i++) {
#ifdef _LP64
return (ret);
int length;
case PCI_ADDR_IO:
case PCI_ADDR_MEM32:
case PCI_ADDR_MEM64:
&k) != DDI_PROP_SUCCESS) {
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
int length;
int acount;
return (PCICFG_FAILURE);
for (i = 0; i < acount; i++) {
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
!= PCICFG_SUCCESS) {
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
int circ;
return (PCICFG_FAILURE);
goto failed;
goto failed;
for (i = 0; i < pcicfg_max_device; i++)
for (j = 0; j < pcicfg_max_function; j++)
j, &header_type)) {
case PCICFG_FAILURE:
new_bus, i, j);
goto failed;
case PCICFG_NODEVICE:
case PCICFG_NOMULTI:
j = pcicfg_max_function;
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
int ret;
int circ;
return (PCICFG_FAILURE);
goto failedconfig;
!= PCICFG_SUCCESS) {
return (ret);
goto failedconfig;
if (func == 0) {
return (PCICFG_NOMULTI);
goto failedchild;
goto failedchild;
switch (sub_class) {
case PCI_BRIDGE_PCI:
== PCI_HEADER_PPB) {
&k) != DDI_PROP_SUCCESS)
goto failedchild;
#if defined(CARDBUS_DEBUG)
!= PCICFG_SUCCESS) {
goto failedchild;
for (i = 0; i < pcicfg_max_device; i++)
for (j = 0; j < pcicfg_max_function;
switch (cardbus_probe_children(
cbp,
new_bus, i,
j, header_type)) {
case PCICFG_FAILURE:
new_bus, i, j);
goto failedchild;
case PCICFG_NODEVICE:
case PCICFG_NOMULTI:
j = pcicfg_max_function;
case PCI_BRIDGE_CARDBUS:
if (request != 0) {
goto failedchild;
goto failedchild;
case PCI_BRIDGE_ISA:
#if defined(CARDBUS_DEBUG)
!= PCICFG_SUCCESS) {
goto failedchild;
goto failedchild;
&isa_nodes[i])) {
case PCICFG_FAILURE:
goto failedchild;
case PCICFG_NODEVICE:
case PCI_BRIDGE_OTHER:
goto leaf_node;
struct ether_addr *);
0) != NDI_SUCCESS)
case DDI_PROP_TYPE_INT:
case DDI_PROP_TYPE_STRING:
case DDI_PROP_TYPE_ANY:
#if defined(CARDBUS_DEBUG)
i = PCI_CONF_BASE0;
while (i <= PCI_CONF_BASE5) {
if (request != 0) {
goto failedchild;
goto failedchild;
== PCI_BASE_TYPE_ALL) &&
== PCI_BASE_SPACE_MEM)) {
i, request,
i, request,
if (request != 0) {
goto failedchild;
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
int ret;
return (PCICFG_FAILURE);
goto failed;
reg[0] = 0;
goto failed;
return (PCICFG_SUCCESS);
return (PCICFG_FAILURE);
int status;
int rlen;
int ret;
#ifdef sparc
switch (status) {
case DDI_PROP_SUCCESS:
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
#ifdef sparc
return (ret);
int circ;
int alen;
switch (status) {
case DDI_PROP_SUCCESS:
alen);
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
alen = 0;
if (alen)
return (PCICFG_SUCCESS);
switch (status) {
case DDI_PROP_SUCCESS:
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
switch (status) {
case DDI_PROP_SUCCESS:
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
alen = 0;
#ifdef DEBUG
if (alen)
if (alen)
return (PCICFG_SUCCESS);
int rlen;
#if defined(CARDBUS_DEBUG)
int i, nrange;
switch (status) {
case DDI_PROP_SUCCESS:
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
sizeof (cardbus_range_t)/sizeof (int))
!= DDI_SUCCESS) {
return (PCICFG_FAILURE);
return (PCICFG_SUCCESS);
#if defined(CARDBUS_DEBUG)
for (i = 0; i <= nrange; i++) {
nr++;
return (PCICFG_SUCCESS);
int rlen;
switch (status) {
case DDI_PROP_SUCCESS:
case DDI_PROP_NO_MEMORY:
return (PCICFG_FAILURE);
return (PCICFG_FAILURE);
== PCI_BASE_TYPE_ALL) {
return (PCICFG_SUCCESS);
int ret;
return (ret);
return (ret);
return (PCICFG_FAILURE);
return (ret);
return (ret);
return (ret);
return (ret);
return (ret);
return (ret);
return (ret);
return (ret);
PCI_CBUS_SUBVENID)) != 0) {
return (ret);
PCI_CBUS_SUBSYSID)) != 0) {
return (ret);
PCI_CONF_SUBVENID)) != 0) {
return (ret);
PCI_CONF_SUBSYSID)) != 0) {
return (ret);
PCI_CONF_CACHE_LINESZ)) != 0) {
return (ret);
return (ret);
return (PCICFG_SUCCESS);
int ret, n;
return (ret);
return (PCICFG_FAILURE);
return (ret);
return (PCICFG_SUCCESS);
return (PCICFG_SUCCESS);
return (PCICFG_SUCCESS);
* drivers in /etc/driver_aliases if required
int ret;
#ifndef _DONT_USE_1275_GENERIC_NAMES
char *name;
#ifndef _DONT_USE_1275_GENERIC_NAMES
if (subsysid != 0) {
#ifdef _DONT_USE_1275_GENERIC_NAMES
return (PCICFG_FAILURE);
if (subsysid != 0) {
if (subsysid != 0) {
return (ret);
return (PCICFG_SUCCESS);
comm = 0;
#ifndef _DONT_USE_1275_GENERIC_NAMES
return (NULL);
int ret;
int ret;
!= DDI_SUCCESS)
pname);
int ret;
*dev = 0;
*func = 0;
while (c = *naddr++) {
#ifdef DEBUG
switch (header_type) {
case PCI_HEADER_PPB:
case PCI_HEADER_CARDBUS:
switch (header_type) {
case PCI_HEADER_CARDBUS:
#if defined(CARDBUS_DEBUG)
for (i = 0; i < nelems; i++) {
#if defined(CARDBUS_DEBUG)