pcix.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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"
#include <sys/sysmacros.h>
#include <sys/ddi_impldefs.h>
#include <sys/ddi_implfuncs.h>
/*LINTLIBRARY*/
static uint16_t
{
/*
* Walk the Capabilities List and locate
* the PCI-X Capability.
*/
else
while (caps_ptr != PCI_CAP_NEXT_PTR_NULL) {
if (cap == PCI_CAP_ID_PCIX)
return (caps_ptr);
}
return (0);
}
void
{
return;
/*
* Only modify the Command Register of non-bridge functions.
*/
PCI_HEADER_TYPE_M) == PCI_HEADER_PPB) {
return;
}
"pcix_set_cmd_reg: pcix_cap_offset = %x\n", pcix_cap_offset);
if (pcix_cap_offset) {
/*
* Read the PCI-X Command Register.
*/
"pcix_set_cmd_reg: PCI-X CMD "
"Register (Before) %x\n", pcix_cmd);
"pcix_set_cmd_reg: PCI-X CMD "
"Register (After) %x\n", pcix_cmd);
}
}