10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 23*1001Ssl147100 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_USB_HUBDVAR_H 280Sstevel@tonic-gate #define _SYS_USB_HUBDVAR_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 360Sstevel@tonic-gate #include <sys/sunndi.h> 370Sstevel@tonic-gate #include <sys/ndi_impldefs.h> 380Sstevel@tonic-gate #include <sys/usb/usba/usba_types.h> 390Sstevel@tonic-gate #include <sys/callb.h> 400Sstevel@tonic-gate 410Sstevel@tonic-gate /* 420Sstevel@tonic-gate * HUB USB device state management : 430Sstevel@tonic-gate * 440Sstevel@tonic-gate * CHILD PWRLVL---1>--------+ 450Sstevel@tonic-gate * ^ | 460Sstevel@tonic-gate * 8 | 470Sstevel@tonic-gate * | | 480Sstevel@tonic-gate * 9 | 490Sstevel@tonic-gate * v | 500Sstevel@tonic-gate * PWRED_DWN---<3----4>--ONLINE---<2-----1>-DISCONNECTED 510Sstevel@tonic-gate * | | ^ | | 520Sstevel@tonic-gate * | | 10 | | 530Sstevel@tonic-gate * | | | | | 540Sstevel@tonic-gate * | | RECOVER-<2-------+ | 550Sstevel@tonic-gate * | | ^ | 560Sstevel@tonic-gate * | 5 6 | 570Sstevel@tonic-gate * | | | | 580Sstevel@tonic-gate * | v | | 590Sstevel@tonic-gate * +----5>----------SUSPENDED----<5----7>----+ 600Sstevel@tonic-gate * 610Sstevel@tonic-gate * 1 = Device Unplug 620Sstevel@tonic-gate * 2 = Original Device reconnected and after hub driver restores its own 630Sstevel@tonic-gate * device state. 640Sstevel@tonic-gate * 3 = Device idles for time T & transitions to low power state 650Sstevel@tonic-gate * 4 = Remote wakeup by device OR Application kicking off IO to device 660Sstevel@tonic-gate * 5 = Notification to save state prior to DDI_SUSPEND 670Sstevel@tonic-gate * 6 = Notification to restore state after DDI_RESUME with correct device 680Sstevel@tonic-gate * and after hub driver restores its own device state. 690Sstevel@tonic-gate * 7 = Notification to restore state after DDI_RESUME with device 700Sstevel@tonic-gate * disconnected or a wrong device 710Sstevel@tonic-gate * 8 = Hub detect child doing remote wakeup and request the PM 720Sstevel@tonic-gate * framework to bring it to full power 730Sstevel@tonic-gate * 9 = PM framework has compeleted call power entry point of the child 740Sstevel@tonic-gate * and bus ctls of hub 750Sstevel@tonic-gate * 10 = Restoring states of its children i.e. set addrs & config. 760Sstevel@tonic-gate * 770Sstevel@tonic-gate */ 780Sstevel@tonic-gate 790Sstevel@tonic-gate #define HUBD_INITIAL_SOFT_SPACE 4 800Sstevel@tonic-gate 810Sstevel@tonic-gate typedef struct hub_power_struct { 820Sstevel@tonic-gate void *hubp_hubd; /* points back to hubd_t */ 830Sstevel@tonic-gate 840Sstevel@tonic-gate uint8_t hubp_wakeup_enabled; /* remote wakeup enabled? */ 850Sstevel@tonic-gate 860Sstevel@tonic-gate /* this is the bit mask of the power states that device has */ 870Sstevel@tonic-gate uint8_t hubp_pwr_states; 880Sstevel@tonic-gate 890Sstevel@tonic-gate int hubp_busy_pm; /* device busy accounting */ 900Sstevel@tonic-gate 910Sstevel@tonic-gate /* wakeup and power transition capabilities of an interface */ 920Sstevel@tonic-gate uint8_t hubp_pm_capabilities; 930Sstevel@tonic-gate 940Sstevel@tonic-gate uint8_t hubp_current_power; /* current power level */ 950Sstevel@tonic-gate 960Sstevel@tonic-gate time_t hubp_time_at_full_power; /* timestamp 0->3 */ 970Sstevel@tonic-gate 980Sstevel@tonic-gate uint8_t hubp_min_pm_threshold; /* in seconds */ 990Sstevel@tonic-gate 1000Sstevel@tonic-gate /* power state of all children are tracked here */ 1010Sstevel@tonic-gate uint8_t *hubp_child_pwrstate; 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate /* pm-components properties are stored here */ 1040Sstevel@tonic-gate char *hubp_pmcomp[5]; 1050Sstevel@tonic-gate 1060Sstevel@tonic-gate usba_cfg_pwr_descr_t hubp_confpwr_descr; /* config pwr descr */ 1070Sstevel@tonic-gate } hub_power_t; 1080Sstevel@tonic-gate 1090Sstevel@tonic-gate /* warlock directives, stable data */ 1100Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_hubd)) 1110Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_wakeup_enabled)) 1120Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_pwr_states)) 1130Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_time_at_full_power)) 1140Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_min_pm_threshold)) 1150Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_pm_capabilities)) 1160Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_pmcomp)) 1170Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hub_power_t::hubp_confpwr_descr)) 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate 1200Sstevel@tonic-gate #define HUBD_APID_NAMELEN 32 /* max len in cfgadm display */ 1210Sstevel@tonic-gate 1220Sstevel@tonic-gate /* 1230Sstevel@tonic-gate * hubd cpr data structure used for callback before kernel threads are 1240Sstevel@tonic-gate * suspended 1250Sstevel@tonic-gate */ 1260Sstevel@tonic-gate typedef struct hubd_cpr { 1270Sstevel@tonic-gate callb_cpr_t cpr; /* for cpr related info */ 1280Sstevel@tonic-gate struct hubd *statep; /* ohci soft state struct */ 1290Sstevel@tonic-gate kmutex_t lockp; 1300Sstevel@tonic-gate } hubd_cpr_t; 1310Sstevel@tonic-gate 1320Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hubd_cpr_t::cpr)) 1330Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hubd_cpr_t::statep)) 1340Sstevel@tonic-gate 1350Sstevel@tonic-gate 1360Sstevel@tonic-gate /* 1370Sstevel@tonic-gate * soft state information for this hubd 1380Sstevel@tonic-gate */ 1390Sstevel@tonic-gate typedef struct hubd { 1400Sstevel@tonic-gate int h_instance; 1410Sstevel@tonic-gate uint_t h_init_state; 1420Sstevel@tonic-gate uint_t h_dev_state; 1430Sstevel@tonic-gate int8_t h_bus_ctls; 1440Sstevel@tonic-gate int8_t h_bus_pwr; 1450Sstevel@tonic-gate hub_power_t *h_hubpm; /* pointer to power struct */ 1460Sstevel@tonic-gate dev_info_t *h_dip; 1470Sstevel@tonic-gate 1480Sstevel@tonic-gate /* 1490Sstevel@tonic-gate * mutex to protect softstate and hw regs 1500Sstevel@tonic-gate */ 1510Sstevel@tonic-gate kmutex_t h_mutex; 1520Sstevel@tonic-gate 1530Sstevel@tonic-gate /* 1540Sstevel@tonic-gate * save the usba_device pointer 1550Sstevel@tonic-gate */ 1560Sstevel@tonic-gate usba_device_t *h_usba_device; 1570Sstevel@tonic-gate 1580Sstevel@tonic-gate int h_softstate; 1590Sstevel@tonic-gate 1600Sstevel@tonic-gate /* 1610Sstevel@tonic-gate * default pipe handle 1620Sstevel@tonic-gate */ 1630Sstevel@tonic-gate usb_pipe_handle_t h_default_pipe; 1640Sstevel@tonic-gate 1650Sstevel@tonic-gate /* 1660Sstevel@tonic-gate * pipe handle for ep1 1670Sstevel@tonic-gate */ 1680Sstevel@tonic-gate usb_pipe_handle_t h_ep1_ph; 1690Sstevel@tonic-gate usb_ep_descr_t h_ep1_descr; 1700Sstevel@tonic-gate usb_pipe_policy_t h_pipe_policy; 1710Sstevel@tonic-gate uint_t h_intr_pipe_state; 1720Sstevel@tonic-gate 1730Sstevel@tonic-gate /* 1740Sstevel@tonic-gate * root hub descriptor 1750Sstevel@tonic-gate */ 1760Sstevel@tonic-gate struct usb_hub_descr h_hub_descr; 1770Sstevel@tonic-gate 1780Sstevel@tonic-gate /* 1790Sstevel@tonic-gate * hotplug handling 1800Sstevel@tonic-gate */ 1810Sstevel@tonic-gate uint_t h_hotplug_thread; 1820Sstevel@tonic-gate 1830Sstevel@tonic-gate /* 1840Sstevel@tonic-gate * h_children_dips is a array for holding 1850Sstevel@tonic-gate * each child dip indexed by port 1860Sstevel@tonic-gate * h_usba_devices is the corresponding usba_device 1870Sstevel@tonic-gate */ 1880Sstevel@tonic-gate dev_info_t **h_children_dips; 1890Sstevel@tonic-gate size_t h_cd_list_length; 1900Sstevel@tonic-gate usba_device_t **h_usba_devices; 1910Sstevel@tonic-gate 1920Sstevel@tonic-gate /* change reported by hub, limited to 31 ports */ 1930Sstevel@tonic-gate usb_port_mask_t h_port_change; 1940Sstevel@tonic-gate 1950Sstevel@tonic-gate /* waiting for reset completion callback */ 1960Sstevel@tonic-gate usb_port_mask_t h_port_reset_wait; 1970Sstevel@tonic-gate 1980Sstevel@tonic-gate /* track transitions of child on each port */ 1990Sstevel@tonic-gate uint16_t h_port_state[MAX_PORTS + 1]; 2000Sstevel@tonic-gate 2010Sstevel@tonic-gate /* track event registration of children */ 2020Sstevel@tonic-gate uint8_t h_child_events[MAX_PORTS + 1]; 2030Sstevel@tonic-gate 2040Sstevel@tonic-gate kcondvar_t h_cv_reset_port; 2050Sstevel@tonic-gate uint_t h_intr_completion_reason; 2060Sstevel@tonic-gate usb_log_handle_t h_log_handle; /* for logging msgs */ 2070Sstevel@tonic-gate 2080Sstevel@tonic-gate ndi_event_hdl_t h_ndi_event_hdl; 2090Sstevel@tonic-gate hubd_cpr_t *h_cpr_cb; 2100Sstevel@tonic-gate 2110Sstevel@tonic-gate /* 2120Sstevel@tonic-gate * Hotplug event statistics since hub was attached 2130Sstevel@tonic-gate */ 2140Sstevel@tonic-gate ulong_t h_total_hotplug_success; 2150Sstevel@tonic-gate ulong_t h_total_hotplug_failure; 2160Sstevel@tonic-gate 2170Sstevel@tonic-gate /* for minor node */ 2180Sstevel@tonic-gate char *h_ancestry_str; 2190Sstevel@tonic-gate 2200Sstevel@tonic-gate /* registration data */ 2210Sstevel@tonic-gate usb_client_dev_data_t *h_dev_data; 2220Sstevel@tonic-gate 2230Sstevel@tonic-gate /* for deathrow implementation */ 2240Sstevel@tonic-gate boolean_t h_cleanup_enabled; 2250Sstevel@tonic-gate boolean_t h_cleanup_needed; 2260Sstevel@tonic-gate boolean_t h_cleanup_active; 227*1001Ssl147100 228*1001Ssl147100 /* 229*1001Ssl147100 * for power budget support 230*1001Ssl147100 * h_pwr_limit and h_pwr_left are expressed 231*1001Ssl147100 * in 2mA units 232*1001Ssl147100 */ 233*1001Ssl147100 boolean_t h_local_pwr_capable; 234*1001Ssl147100 boolean_t h_local_pwr_on; 235*1001Ssl147100 uint16_t h_pwr_limit; /* per port pwr limit */ 236*1001Ssl147100 int16_t h_pwr_left; /* limit on the whole hub */ 237*1001Ssl147100 238*1001Ssl147100 /* 239*1001Ssl147100 * conf file override to power budget property 240*1001Ssl147100 * if 1, power budget is disabled 241*1001Ssl147100 */ 242*1001Ssl147100 boolean_t h_ignore_pwr_budget; 2430Sstevel@tonic-gate } hubd_t; 2440Sstevel@tonic-gate 2450Sstevel@tonic-gate _NOTE(MUTEX_PROTECTS_DATA(hubd::h_mutex, hubd)) 2460Sstevel@tonic-gate _NOTE(MUTEX_PROTECTS_DATA(hubd::h_mutex, hub_power_t)) 2470Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(hubd::h_default_pipe 2480Sstevel@tonic-gate hubd::h_usba_device 2490Sstevel@tonic-gate hubd::h_dev_data 2500Sstevel@tonic-gate hubd::h_ndi_event_hdl 2510Sstevel@tonic-gate hubd::h_cpr_cb 2520Sstevel@tonic-gate hubd::h_log_handle 2530Sstevel@tonic-gate hubd::h_ep1_ph 2540Sstevel@tonic-gate hubd::h_instance 2550Sstevel@tonic-gate hubd::h_hubpm 2560Sstevel@tonic-gate hubd::h_dip 257*1001Ssl147100 hubd::h_ignore_pwr_budget 2580Sstevel@tonic-gate )) 2590Sstevel@tonic-gate 2600Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("stable data", usb_ep_descr)) 2610Sstevel@tonic-gate 2620Sstevel@tonic-gate #define HUBD_UNIT(dev) (getminor((dev))) 2630Sstevel@tonic-gate #define HUBD_MUTEX(hubd) (&((hubd)->h_mutex)) 2640Sstevel@tonic-gate #define HUBD_SS_ISOPEN 0x0001 2650Sstevel@tonic-gate #define HUBD_ACK_ALL_CHANGES PORT_CHANGE_MASK 2660Sstevel@tonic-gate 2670Sstevel@tonic-gate /* init state */ 2680Sstevel@tonic-gate #define HUBD_LOCKS_DONE 0x0001 2690Sstevel@tonic-gate #define HUBD_HUBDI_REGISTERED 0x0002 2700Sstevel@tonic-gate #define HUBD_MINOR_NODE_CREATED 0x0004 271*1001Ssl147100 #define HUBD_CHILDREN_CREATED 0x0008 2720Sstevel@tonic-gate #define HUBD_EVENTS_REGISTERED 0x0020 2730Sstevel@tonic-gate 2740Sstevel@tonic-gate /* 2750Sstevel@tonic-gate * port flags : These are essentially extensions of Port Status Field Bits 2760Sstevel@tonic-gate * as in USB 2.0 spec Table 11-21 and #defined in hubd.h file. We make use 2770Sstevel@tonic-gate * of the unused bits (5-7,13-15) here to track states of the hub's child. 2780Sstevel@tonic-gate */ 2790Sstevel@tonic-gate #define HUBD_CHILD_ATTACHING 0x0020 2800Sstevel@tonic-gate #define HUBD_CHILD_DETACHING 0x0040 2810Sstevel@tonic-gate #define HUBD_CHILD_PWRLVL_CHNG 0x0080 2820Sstevel@tonic-gate #define HUBD_CHILD_RAISE_POWER 0x2000 2830Sstevel@tonic-gate #define HUBD_CHILD_ZAP 0x4000 2840Sstevel@tonic-gate 2850Sstevel@tonic-gate /* Tracking events registered by children */ 2860Sstevel@tonic-gate #define HUBD_CHILD_EVENT_DISCONNECT 0x01 2870Sstevel@tonic-gate #define HUBD_CHILD_EVENT_PRESUSPEND 0x02 2880Sstevel@tonic-gate 2890Sstevel@tonic-gate /* This dev state is used exclusively by hub to change port suspend/resume */ 2900Sstevel@tonic-gate #define USB_DEV_HUB_CHILD_PWRLVL 0x80 2910Sstevel@tonic-gate #define USB_DEV_HUB_STATE_RECOVER 0x81 2920Sstevel@tonic-gate 2930Sstevel@tonic-gate /* 2940Sstevel@tonic-gate * hubd interrupt pipe management : 2950Sstevel@tonic-gate * 2960Sstevel@tonic-gate * Following are the states of the interrupt pipe 2970Sstevel@tonic-gate * 2980Sstevel@tonic-gate * IDLE: 2990Sstevel@tonic-gate * initial state and after closing of the interrupt pipe 3000Sstevel@tonic-gate * 3010Sstevel@tonic-gate * OPENING: 3020Sstevel@tonic-gate * Set when the pipe is being opened 3030Sstevel@tonic-gate * 3040Sstevel@tonic-gate * ACTIVE: 3050Sstevel@tonic-gate * Set when the pipe has been opened in hubd_open_intr_pipe. This is 3060Sstevel@tonic-gate * typically after a hub has got enumerated and initialized. 3070Sstevel@tonic-gate * 3080Sstevel@tonic-gate * CLOSING : 3090Sstevel@tonic-gate * Set when the pipe is closed by calling hubd_close_intr_pipe(). This is 3100Sstevel@tonic-gate * typically called on hub disconnect via hubd_cleanup. 3110Sstevel@tonic-gate */ 3120Sstevel@tonic-gate #define HUBD_INTR_PIPE_IDLE 0 3130Sstevel@tonic-gate #define HUBD_INTR_PIPE_OPENING 1 3140Sstevel@tonic-gate #define HUBD_INTR_PIPE_ACTIVE 2 3150Sstevel@tonic-gate #define HUBD_INTR_PIPE_STOPPED 3 3160Sstevel@tonic-gate #define HUBD_INTR_PIPE_CLOSING 4 3170Sstevel@tonic-gate 3180Sstevel@tonic-gate 3190Sstevel@tonic-gate /* request structure for putting dips on deathrow list */ 3200Sstevel@tonic-gate typedef struct hubd_offline_req { 3210Sstevel@tonic-gate usba_list_entry_t or_queue; /* DO NOT MOVE! */ 3220Sstevel@tonic-gate hubd_t *or_hubd; 3230Sstevel@tonic-gate usb_port_t or_port; 3240Sstevel@tonic-gate dev_info_t *or_dip; 3250Sstevel@tonic-gate uint_t or_flag; 3260Sstevel@tonic-gate } hubd_offline_req_t; 3270Sstevel@tonic-gate 3280Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("unshared", hubd_offline_req)) 3290Sstevel@tonic-gate 3300Sstevel@tonic-gate 3310Sstevel@tonic-gate /* 3320Sstevel@tonic-gate * cfgadm state values 3330Sstevel@tonic-gate */ 3340Sstevel@tonic-gate #define HUBD_CFGADM_NORMAL 0 /* normal state */ 3350Sstevel@tonic-gate #define HUBD_CFGADM_DISCONNECTED 1 /* logically disconnected */ 3360Sstevel@tonic-gate #define HUBD_CFGADM_UNCONFIGURED 2 /* port is unconfigured */ 3370Sstevel@tonic-gate #define HUBD_CFGADM_EMPTY 3 /* port is empty */ 3380Sstevel@tonic-gate #define HUBD_CFGADM_STILL_REFERENCED 4 /* ndi_devi_offline failed */ 3390Sstevel@tonic-gate #define HUBD_CFGADM_CONFIGURED 5 /* port is configured */ 3400Sstevel@tonic-gate 3410Sstevel@tonic-gate /* 3420Sstevel@tonic-gate * Debug printing 3430Sstevel@tonic-gate * Masks 3440Sstevel@tonic-gate */ 3450Sstevel@tonic-gate #define DPRINT_MASK_ATTA 0x00000001 3460Sstevel@tonic-gate #define DPRINT_MASK_CBOPS 0x00000002 3470Sstevel@tonic-gate #define DPRINT_MASK_CALLBACK 0x00000004 3480Sstevel@tonic-gate #define DPRINT_MASK_PORT 0x00000008 3490Sstevel@tonic-gate #define DPRINT_MASK_HUB 0x00000010 3500Sstevel@tonic-gate #define DPRINT_MASK_HOTPLUG 0x00000020 3510Sstevel@tonic-gate #define DPRINT_MASK_EVENTS 0x00000040 3520Sstevel@tonic-gate #define DPRINT_MASK_PM 0x00000080 3530Sstevel@tonic-gate #define DPRINT_MASK_ALL 0xFFFFFFFF 3540Sstevel@tonic-gate 3550Sstevel@tonic-gate 3560Sstevel@tonic-gate /* status length used in getting hub status */ 3570Sstevel@tonic-gate #define GET_STATUS_LENGTH 0x04 /* length of get status req */ 3580Sstevel@tonic-gate 3590Sstevel@tonic-gate /* flag for hubd_start_polling */ 3600Sstevel@tonic-gate #define HUBD_ALWAYS_START_POLLING 1 3610Sstevel@tonic-gate 3620Sstevel@tonic-gate /* enumeration timeout */ 3630Sstevel@tonic-gate #define HUBDI_ENUM_TIMEOUT 1 /* 1 second */ 3640Sstevel@tonic-gate 365*1001Ssl147100 /* power budget unit in mA */ 366*1001Ssl147100 #define USB_PWR_UNIT_LOAD 100 367*1001Ssl147100 368*1001Ssl147100 /* power values in 100mA units */ 369*1001Ssl147100 #define USB_HIGH_PWR_VALUE 5 370*1001Ssl147100 #define USB_LOW_PWR_VALUE 1 371*1001Ssl147100 372*1001Ssl147100 /* 373*1001Ssl147100 * According to section 9.6.3 of USB 2.0 spec, 374*1001Ssl147100 * bMaxPower in the device configuration descriptor 375*1001Ssl147100 * is expressed in 2mA units 376*1001Ssl147100 */ 377*1001Ssl147100 #define USB_CFG_DESCR_PWR_UNIT 2 378*1001Ssl147100 3790Sstevel@tonic-gate #ifdef __cplusplus 3800Sstevel@tonic-gate } 3810Sstevel@tonic-gate #endif 3820Sstevel@tonic-gate 3830Sstevel@tonic-gate #endif /* _SYS_USB_HUBDVAR_H */ 384