hpci_confupdate(D3hpci)
hpci_confupdate --
update hot plug controller interface configuration list
Synopsis
#include <sys/types.h>
#include <sys/hpci.h>
#include <sys/ddi.h>
void hpci_confupdate(int hpcid, hpci_socket_info_t *socket, int flag);
Description
hpci_confupdate( )
Updates the socket configuration information in the kernel.
Arguments
hpcid-
HPCD instance ID,
returned by the
hpci_attach(D3hpci)
function.
socket-
pointer to the socket to be configured.
flag-
set to HPCI_CONFIGURE or HPCI_DECONFIGURE
to indicate whether to configure or deconfigure the socket elements.
Return values
None.
Usage
hpci_confupdate( )
is called from the
modify_callback(D2hpci)
routine to notify HPCI about the addition or deletion of devices
on a hot plug socket.
It is typically used after bringing an adapter card in service
(for example, power on) or removing an adapter card from service
(for example, power off).
In the case of a newly added card, this call registers all the device
functions that are found on the card with the operating system.
When a card is removed, this call deregisters the device functions on the card
from the operating system.
Context and synchronization
Interrupt
context
Hardware applicability
All
Version applicability
hpci:
1
References
``Hotplug devices'' in HDK Technical Reference
``PCI'' in HDK Technical Reference
Examples
This code fragment is from the
modify_callback(D2hpci)
entry point routine.
1 int
2 configure_socket (int cmd,
3 hpci_socket_info_t *socket)
4 {
/* resource allocation, etc */
5 switch(cmd)
6 {
7 case POWER_ON: /* turn socket power on */
/* build device function information list */
8 build_function_list(socket);
/* inform HPCI about any devices found */
9 hpci_confupdate(socket->hpcid, socket, HPCI_CONFIGURE);
10 break;
11 case POWER_OFF: /* turn socket power off */
12 hpci_confupdate(socket->hpcid, socket, HPCI_DECONFIGURE);
/* deallocate memory/resources */
13 free_resources(&socket);
14 break;
15 case xxx: /* handle other cases here */
16 break;
17 default:
18 cmn_err(CE_WARN, "%s: configure_socket: invalid request 0x%x for hpcid=$d\n",
19 return(EINVAL);
20 }
21 return(0;
22 }
Line 2-
user requested command
Line 3-
pointer to the hpci_socket_info_t structure
Line 8-
populate the socket data structure with any devices that were found
during the power-on operation
Line 9-
inform HPCI about any devices found
Line 12-
deconfigure all devices connected to this socket
Line 13-
deallocate memory/resources for this socket
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005