Print this page
remove support for non-ANSI compilation


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*


  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #ifndef _SYS_HOTPLUG_HPCTRL_H
  28 #define _SYS_HOTPLUG_HPCTRL_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 /*
  33  * ****************************************************************
  34  * Hot Plug Controller interfaces for PCI and CompactPCI platforms.
  35  * ****************************************************************
  36  */
  37 #include <sys/types.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * Type definition for slot handle. This is an opaque pointer
  45  * created by the HPS framework.
  46  */
  47 typedef void *hpc_slot_t;
  48 
  49 #define HPC_SLOT_OPS_VERSION    0
  50 
  51 /*


 253 #define HPC_ERR_INVALID                 0x1     /* invalid arguments */
 254 #define HPC_ERR_SLOT_NOTREGISTERED      0x2     /* slot is not registered */
 255 #define HPC_ERR_SLOT_DUPLICATE          0x3     /* slot is already registered */
 256 #define HPC_ERR_BUS_NOTREGISTERED       0x4     /* slot is not registered */
 257 #define HPC_ERR_BUS_DUPLICATE           0x5     /* slot is already registered */
 258 #define HPC_ERR_NOTSUPPORTED            0x6     /* operation not supported */
 259 #define HPC_ERR_FAILED                  0x7     /* operation failed */
 260 
 261 /* return values for event notifications */
 262 #define HPC_EVENT_CLAIMED               0x10    /* HPC event is claimed */
 263 #define HPC_EVENT_UNCLAIMED             -1      /* HPC event is not claimed */
 264 
 265 /* definitions for slot (un)registration events */
 266 #define HPC_SLOT_ONLINE         1       /* slot is registered */
 267 #define HPC_SLOT_OFFLINE        2       /* slot is unregistered */
 268 
 269 /*
 270  * function prototype definitions for interfaces between HPC driver
 271  * and Hot Plug Services framework.
 272  */
 273 #ifdef  __STDC__
 274 extern int hpc_slot_register(dev_info_t *dip, char *bus_path,
 275         hpc_slot_info_t *slot_info, hpc_slot_t *slot_hdl,
 276         hpc_slot_ops_t *slot_ops, caddr_t ops_arg, uint_t flags);
 277 extern int hpc_slot_unregister(hpc_slot_t *slot_hdl);
 278 extern struct hpc_slot_ops *hpc_alloc_slot_ops(int sleepflag);
 279 extern void hpc_free_slot_ops(hpc_slot_ops_t *ops);
 280 extern int hpc_slot_event_notify(hpc_slot_t slot_hdl, uint_t event,
 281         uint_t flags);
 282 extern boolean_t hpc_bus_registered(hpc_slot_t slot_hdl);
 283 #else
 284 extern int hpc_slot_register();
 285 extern int hpc_slot_unregister();
 286 extern struct hpc_slot_ops *hpc_alloc_slot_ops();
 287 extern void hpc_free_slot_ops();
 288 extern int hpc_slot_event_notify();
 289 extern boolean_t hpc_bus_registered();
 290 #endif  /* __STDC__ */
 291 
 292 /*
 293  * *****************************************************************
 294  * Implementation specific data structures and definitons. These are
 295  * the private interfaces between cfgadm plug-in and the PCI nexus
 296  * driver.
 297  * *****************************************************************
 298  */
 299 
 300 /*
 301  * Data structure used for DEVCTL_AP_CONTROL ioctl on the AP.
 302  */
 303 struct hpc_control_data {
 304         uint_t  cmd;            /* HPC_CTRL_* command */
 305         void    *data;          /* pointer to data that is exchanged */
 306 };
 307 
 308 struct hpc_control32_data {
 309         uint_t    cmd;          /* HPC_CTRL_* command */
 310         caddr32_t data;         /* pointer to data that is exchanged */




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24  *
  25  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  */
  28 
  29 #ifndef _SYS_HOTPLUG_HPCTRL_H
  30 #define _SYS_HOTPLUG_HPCTRL_H
  31 


  32 /*
  33  * ****************************************************************
  34  * Hot Plug Controller interfaces for PCI and CompactPCI platforms.
  35  * ****************************************************************
  36  */
  37 #include <sys/types.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * Type definition for slot handle. This is an opaque pointer
  45  * created by the HPS framework.
  46  */
  47 typedef void *hpc_slot_t;
  48 
  49 #define HPC_SLOT_OPS_VERSION    0
  50 
  51 /*


 253 #define HPC_ERR_INVALID                 0x1     /* invalid arguments */
 254 #define HPC_ERR_SLOT_NOTREGISTERED      0x2     /* slot is not registered */
 255 #define HPC_ERR_SLOT_DUPLICATE          0x3     /* slot is already registered */
 256 #define HPC_ERR_BUS_NOTREGISTERED       0x4     /* slot is not registered */
 257 #define HPC_ERR_BUS_DUPLICATE           0x5     /* slot is already registered */
 258 #define HPC_ERR_NOTSUPPORTED            0x6     /* operation not supported */
 259 #define HPC_ERR_FAILED                  0x7     /* operation failed */
 260 
 261 /* return values for event notifications */
 262 #define HPC_EVENT_CLAIMED               0x10    /* HPC event is claimed */
 263 #define HPC_EVENT_UNCLAIMED             -1      /* HPC event is not claimed */
 264 
 265 /* definitions for slot (un)registration events */
 266 #define HPC_SLOT_ONLINE         1       /* slot is registered */
 267 #define HPC_SLOT_OFFLINE        2       /* slot is unregistered */
 268 
 269 /*
 270  * function prototype definitions for interfaces between HPC driver
 271  * and Hot Plug Services framework.
 272  */

 273 extern int hpc_slot_register(dev_info_t *dip, char *bus_path,
 274         hpc_slot_info_t *slot_info, hpc_slot_t *slot_hdl,
 275         hpc_slot_ops_t *slot_ops, caddr_t ops_arg, uint_t flags);
 276 extern int hpc_slot_unregister(hpc_slot_t *slot_hdl);
 277 extern struct hpc_slot_ops *hpc_alloc_slot_ops(int sleepflag);
 278 extern void hpc_free_slot_ops(hpc_slot_ops_t *ops);
 279 extern int hpc_slot_event_notify(hpc_slot_t slot_hdl, uint_t event,
 280         uint_t flags);
 281 extern boolean_t hpc_bus_registered(hpc_slot_t slot_hdl);








 282 
 283 /*
 284  * *****************************************************************
 285  * Implementation specific data structures and definitons. These are
 286  * the private interfaces between cfgadm plug-in and the PCI nexus
 287  * driver.
 288  * *****************************************************************
 289  */
 290 
 291 /*
 292  * Data structure used for DEVCTL_AP_CONTROL ioctl on the AP.
 293  */
 294 struct hpc_control_data {
 295         uint_t  cmd;            /* HPC_CTRL_* command */
 296         void    *data;          /* pointer to data that is exchanged */
 297 };
 298 
 299 struct hpc_control32_data {
 300         uint_t    cmd;          /* HPC_CTRL_* command */
 301         caddr32_t data;         /* pointer to data that is exchanged */