hubdvar.h revision ffcd51f34e6cd303b9745909c4632da63426be17
* See the License for the specific language governing permissions * and limitations under the License. * When distributing Covered Code, include this CDDL HEADER in each * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. #
pragma ident "%Z%%M% %I% %E% SMI" * HUB USB device state management : * CHILD PWRLVL---1>--------+ * PWRED_DWN---<3----4>--ONLINE---<2-----1>-DISCONNECTED * | | RECOVER-<2-------+ | * +----5>----------SUSPENDED----<5----7>----+ * 2 = Original Device reconnected and after hub driver restores its own * 3 = Device idles for time T & transitions to low power state * 4 = Remote wakeup by device OR Application kicking off IO to device * 5 = Notification to save state prior to DDI_SUSPEND * 6 = Notification to restore state after DDI_RESUME with correct device * and after hub driver restores its own device state. * 7 = Notification to restore state after DDI_RESUME with device * disconnected or a wrong device * 8 = Hub detect child doing remote wakeup and request the PM * framework to bring it to full power * 9 = PM framework has compeleted call power entry point of the child * 10 = Restoring states of its children i.e. set addrs & config. /* this is the bit mask of the power states that device has */ /* wakeup and power transition capabilities of an interface */ /* power state of all children are tracked here */ /* pm-components properties are stored here */ /* warlock directives, stable data */ * hubd cpr data structure used for callback before kernel threads are * soft state information for this hubd * mutex to protect softstate and hw regs * save the usba_device pointer * h_children_dips is a array for holding * each child dip indexed by port * h_usba_devices is the corresponding usba_device /* change reported by hub, limited to 31 ports */ /* waiting for reset completion callback */ /* track transitions of child on each port */ /* track reset state of each port */ /* track event registration of children */ * Hotplug event statistics since hub was attached /* for deathrow implementation */ * for power budget support * h_pwr_limit and h_pwr_left are expressed * conf file override to power budget property * if 1, power budget is disabled * hubd hotplug thread argument data structure * flag to indicate if a hotplug thread is started * during hubd attach time, if true, it means the * connected devices need to be enumerated regardless * of the connect status change bit * hubd reset thread argument data structure /* The port needs to be reset */ * port flags : These are essentially extensions of Port Status Field Bits * as in USB 2.0 spec Table 11-21 and #defined in hubd.h file. We make use * of the unused bits (5-7,13-15) here to track states of the hub's child. /* Tracking events registered by children */ /* This dev state is used exclusively by hub to change port suspend/resume */ * hubd interrupt pipe management : * Following are the states of the interrupt pipe * initial state and after closing of the interrupt pipe * Set when the pipe is being opened * Set when the pipe has been opened in hubd_open_intr_pipe. This is * typically after a hub has got enumerated and initialized. * Set when the pipe is closed by calling hubd_close_intr_pipe(). This is * typically called on hub disconnect via hubd_cleanup. /* request structure for putting dips on deathrow list */ /* status length used in getting hub status */ /* flag for hubd_start_polling */ /* enumeration timeout */ /* power budget unit in mA */ /* power values in 100mA units */ * According to section 9.6.3 of USB 2.0 spec, * bMaxPower in the device configuration descriptor * is expressed in 2mA units #
endif /* _SYS_USB_HUBDVAR_H */