Kernel Functions for Drivers pcireportpmcap(9F)
NAME
pcireportpmcap - Report Power Management capability of a
PCI device
SYNOPSIS
#include
#include
int pcireportpmcap(devinfot *dip, int cap, void *arg);
INTERFACE LEVEL
Solaris DI specific (Solaris DI)
PARAMETERS
dip Pointer to the device's devinfo structure
cap Power management capability
arg Argument for the capability
DESCRIPTION
Some PCI devices provide power management capabilities in
addition to those provided by the PCI Power Management
Specification. The pcireportpmcap() function reports those
Power Management capabilities of the PCI device to the
framework. Framework supports dynamic changing of the capa-
bility by allowing pcireportpmcap() to be called multiple
times. Following are the supported capabilities as indicated
by the cap:
PCIPMIDLESPED - The PCIPMIDLESPED value indicates the
lowest PCI clock speed that a device can tolerate when idle,
and is applicable only to 33 MHz PCI bus. arg represents
the lowest possible idle speed in KHz (1 KHz is 1000 Hz).
The integer value representing the speed should be cast to
(void *)before passing as arg to pcireportpmcap().
The special values of arg are:
PCIPMIDLESPEDANY The device can tolerate any idle
clock speed.
SunOS 5.11 Last change: 13 August 1999 1
Kernel Functions for Drivers pcireportpmcap(9F)
PCIPMIDLESPEDNONE The device cannot tolerate slowing
down of PCI clock even when idle.
If the driver doesn't make this call, PCIPMIDLESPEDNONE
is assumed. In this case, one offending device can keep the
entire bus from being power managed.
RETURN VALUES
The pcireportpmcap() function returns:
DISUCES Successful reporting of the capability
DIFAILURE Failure to report capability because of
invalid argument(s)
CONTEXT
The pcireportpmcap() function can be called from user,
kernel and interrupt context.
EXAMPLES
1. A device driver knows that the device it controls works
with any clock between DC and 33 MHz as specified in Section
4.2.3.1: Clock Specification of the PCI Bus Specification
Revision 2.1. The device driver makes the following call
from its attach(9E):
if (pcireportpmcap(dip, PCIPMIDLESPED, PCIPMIDLESPEDANY) !=
DISUCES)
cmnerr(CEWARN, "%s%d: pcireportpmcap failed\n",
ddidrivername(dip), ddigetinstance(dip));
2. A device driver controls a 10/100 Mb Ethernet device
which runs the device state machine on the chip from the PCI
clock. For the device state machine to receive packets at
100 Mb, the PCI clock cannot drop below 4 MHz. The driver
makes the following call whenever it negotiates a 100 Mb
Ethernet connection:
if (pcireportpmcap(dip, PCIPMIDLESPED, (void *)4000) !=
DISUCES)
cmnerr(CEWARN, "%s%d: pcireportpmcap failed\n",
ddidrivername(dip), ddigetinstance(dip));
ATRIBUTES
SunOS 5.11 Last change: 13 August 1999 2
Kernel Functions for Drivers pcireportpmcap(9F)
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
SEE ALSO
Writing Device Drivers
PCI Bus Power Management Interface Specification Version 1.1
PCI Bus Specification Revision 2.1
SunOS 5.11 Last change: 13 August 1999 3
|