usb_midvar.h (7c478bd9) | usb_midvar.h (d73ae94e) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the | 1/* 2 * CDDL HEADER START 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. | 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance 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 | 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END |
21 * 22 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. | 20 */ 21/* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 26#ifndef _SYS_USB_USB_MIDVAR_H 27#define _SYS_USB_USB_MIDVAR_H 28 29#pragma ident "%Z%%M% %I% %E% SMI" 30 31#ifdef __cplusplus 32extern "C" { 33#endif 34 35#include <sys/usb/usba/usbai_private.h> 36 | 23 * Use is subject to license terms. 24 */ 25 26#ifndef _SYS_USB_USB_MIDVAR_H 27#define _SYS_USB_USB_MIDVAR_H 28 29#pragma ident "%Z%%M% %I% %E% SMI" 30 31#ifdef __cplusplus 32extern "C" { 33#endif 34 35#include <sys/usb/usba/usbai_private.h> 36 |
37typedef struct usb_mid_power_struct { 38 void *mip_usb_mid; /* points back to usb_mid_t */ | |
39 | 37 |
40 uint8_t mip_wakeup_enabled; 41 42 /* this is the bit mask of the power states that device has */ 43 uint8_t mip_pwr_states; 44 45 /* wakeup and power transistion capabilites of an interface */ 46 uint8_t mip_pm_capabilities; 47 48 uint8_t mip_current_power; /* current power level */ 49} usb_mid_power_t; 50 51/* warlock directives, stable data */ 52_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid_power_t::mip_usb_mid)) 53_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid_power_t::mip_wakeup_enabled)) 54_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid_power_t::mip_pwr_states)) 55_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid_power_t::mip_pm_capabilities)) 56 57 | |
58/* 59 * soft state information for this usb_mid 60 */ 61typedef struct usb_mid { 62 int mi_instance; 63 64 uint_t mi_init_state; 65 uint_t mi_ugen_open_count; 66 67 kmutex_t mi_mutex; 68 69 /* 70 * dev_info_t reference 71 */ 72 dev_info_t *mi_dip; 73 | 38/* 39 * soft state information for this usb_mid 40 */ 41typedef struct usb_mid { 42 int mi_instance; 43 44 uint_t mi_init_state; 45 uint_t mi_ugen_open_count; 46 47 kmutex_t mi_mutex; 48 49 /* 50 * dev_info_t reference 51 */ 52 dev_info_t *mi_dip; 53 |
74 /* pointer to usb_mid_power_t */ 75 usb_mid_power_t *mi_pm; | 54 /* pointer to usb_common_power_t */ 55 usb_common_power_t *mi_pm; |
76 77 /* 78 * save the usba_device pointer 79 */ 80 usba_device_t *mi_usba_device; 81 82 int mi_softstate; 83 84 int mi_dev_state; 85 86 int mi_n_ifs; 87 88 /* track event registration of children */ 89 uint8_t *mi_child_events; | 56 57 /* 58 * save the usba_device pointer 59 */ 60 usba_device_t *mi_usba_device; 61 62 int mi_softstate; 63 64 int mi_dev_state; 65 66 int mi_n_ifs; 67 68 /* track event registration of children */ 69 uint8_t *mi_child_events; |
70 71 /* record the interface num of each child node */ 72 uint_t *mi_children_ifs; 73 |
|
90 /* | 74 /* |
91 * mi_children_dips is a array for holding | 75 * mi_children_dips is an array for holding |
92 * each child dip indexed by interface number 93 */ 94 dev_info_t **mi_children_dips; | 76 * each child dip indexed by interface number 77 */ 78 dev_info_t **mi_children_dips; |
79 |
|
95 boolean_t mi_removed_children; 96 97 size_t mi_cd_list_length; 98 int mi_attach_count; 99 100 /* logging of messages */ 101 usb_log_handle_t mi_log_handle; 102 --- 4 unchanged lines hidden (view full) --- 107 ndi_event_hdl_t mi_ndi_event_hdl; 108 109 /* ugen support */ 110 usb_ugen_hdl_t mi_ugen_hdl; 111 112} usb_mid_t; 113 114_NOTE(MUTEX_PROTECTS_DATA(usb_mid::mi_mutex, usb_mid)) | 80 boolean_t mi_removed_children; 81 82 size_t mi_cd_list_length; 83 int mi_attach_count; 84 85 /* logging of messages */ 86 usb_log_handle_t mi_log_handle; 87 --- 4 unchanged lines hidden (view full) --- 92 ndi_event_hdl_t mi_ndi_event_hdl; 93 94 /* ugen support */ 95 usb_ugen_hdl_t mi_ugen_hdl; 96 97} usb_mid_t; 98 99_NOTE(MUTEX_PROTECTS_DATA(usb_mid::mi_mutex, usb_mid)) |
115_NOTE(MUTEX_PROTECTS_DATA(usb_mid::mi_mutex, usb_mid_power_t)) | 100_NOTE(MUTEX_PROTECTS_DATA(usb_mid::mi_mutex, usb_common_power_t)) |
116_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid::mi_instance 117 usb_mid::mi_ndi_event_hdl 118 usb_mid::mi_dev_data 119 usb_mid::mi_log_handle 120 usb_mid::mi_ugen_hdl 121 usb_mid::mi_dip 122 usb_mid::mi_pm)) 123 --- 33 unchanged lines hidden --- | 101_NOTE(DATA_READABLE_WITHOUT_LOCK(usb_mid::mi_instance 102 usb_mid::mi_ndi_event_hdl 103 usb_mid::mi_dev_data 104 usb_mid::mi_log_handle 105 usb_mid::mi_ugen_hdl 106 usb_mid::mi_dip 107 usb_mid::mi_pm)) 108 --- 33 unchanged lines hidden --- |