1*6441Sjm22469 /* 2*6441Sjm22469 * CDDL HEADER START 3*6441Sjm22469 * 4*6441Sjm22469 * The contents of this file are subject to the terms of the 5*6441Sjm22469 * Common Development and Distribution License (the "License"). 6*6441Sjm22469 * You may not use this file except in compliance with the License. 7*6441Sjm22469 * 8*6441Sjm22469 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6441Sjm22469 * or http://www.opensolaris.org/os/licensing. 10*6441Sjm22469 * See the License for the specific language governing permissions 11*6441Sjm22469 * and limitations under the License. 12*6441Sjm22469 * 13*6441Sjm22469 * When distributing Covered Code, include this CDDL HEADER in each 14*6441Sjm22469 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6441Sjm22469 * If applicable, add the following below this CDDL HEADER, with the 16*6441Sjm22469 * fields enclosed by brackets "[]" replaced with your own identifying 17*6441Sjm22469 * information: Portions Copyright [yyyy] [name of copyright owner] 18*6441Sjm22469 * 19*6441Sjm22469 * CDDL HEADER END 20*6441Sjm22469 */ 21*6441Sjm22469 22*6441Sjm22469 /* 23*6441Sjm22469 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*6441Sjm22469 * Use is subject to license terms. 25*6441Sjm22469 */ 26*6441Sjm22469 27*6441Sjm22469 #ifndef _DR_IO_H 28*6441Sjm22469 #define _DR_IO_H 29*6441Sjm22469 30*6441Sjm22469 #pragma ident "%Z%%M% %I% %E% SMI" 31*6441Sjm22469 32*6441Sjm22469 /* 33*6441Sjm22469 * VIO DR Control Protocol 34*6441Sjm22469 */ 35*6441Sjm22469 36*6441Sjm22469 #ifdef __cplusplus 37*6441Sjm22469 extern "C" { 38*6441Sjm22469 #endif 39*6441Sjm22469 40*6441Sjm22469 /* 41*6441Sjm22469 * Values of 'msg_type' element of the request message 42*6441Sjm22469 */ 43*6441Sjm22469 #define DR_VIO_CONFIGURE 0x494f43 /* 'IOC' */ 44*6441Sjm22469 #define DR_VIO_UNCONFIGURE 0x494f55 /* 'IOU' */ 45*6441Sjm22469 #define DR_VIO_FORCE_UNCONFIG 0x494f46 /* 'IOF' */ 46*6441Sjm22469 #define DR_VIO_STATUS 0x494f53 /* 'IOS' */ 47*6441Sjm22469 48*6441Sjm22469 /* 49*6441Sjm22469 * VIO DR Request 50*6441Sjm22469 */ 51*6441Sjm22469 typedef struct { 52*6441Sjm22469 uint64_t req_num; 53*6441Sjm22469 uint64_t dev_id; 54*6441Sjm22469 uint32_t msg_type; 55*6441Sjm22469 char name[1]; 56*6441Sjm22469 } dr_vio_req_t; 57*6441Sjm22469 58*6441Sjm22469 /* 59*6441Sjm22469 * Values of 'result' element of the response message 60*6441Sjm22469 */ 61*6441Sjm22469 #define DR_VIO_RES_OK 0x0 62*6441Sjm22469 #define DR_VIO_RES_FAILURE 0x1 63*6441Sjm22469 #define DR_VIO_RES_BLOCKED 0x2 64*6441Sjm22469 #define DR_VIO_RES_NOT_IN_MD 0x3 65*6441Sjm22469 66*6441Sjm22469 /* 67*6441Sjm22469 * Values of 'status' element of the response message 68*6441Sjm22469 */ 69*6441Sjm22469 #define DR_VIO_STAT_NOT_PRESENT 0x0 70*6441Sjm22469 #define DR_VIO_STAT_UNCONFIGURED 0x1 71*6441Sjm22469 #define DR_VIO_STAT_CONFIGURED 0x2 72*6441Sjm22469 73*6441Sjm22469 /* 74*6441Sjm22469 * VIO DR Response 75*6441Sjm22469 */ 76*6441Sjm22469 typedef struct { 77*6441Sjm22469 uint64_t req_num; 78*6441Sjm22469 uint32_t result; 79*6441Sjm22469 uint32_t status; 80*6441Sjm22469 char reason[1]; 81*6441Sjm22469 } dr_vio_res_t; 82*6441Sjm22469 83*6441Sjm22469 #define DR_VIO_DS_ID "dr-vio" 84*6441Sjm22469 #define DR_VIO_MAXREASONLEN 1024 85*6441Sjm22469 86*6441Sjm22469 #ifdef __cplusplus 87*6441Sjm22469 } 88*6441Sjm22469 #endif 89*6441Sjm22469 90*6441Sjm22469 #endif /* _DR_IO_H */ 91