The hub port state machine, on which host has to track and manage, is outlined well in this figure of the USB2.0 spec,
Figure 11-10. Downstream Facing Hub Port State Machine
As this figure also illustrates hub's internal states, the state machine on the host is more simplified.
- Powered off
- Disconnected
- Disabled
- Resetting
- Enabled
- Suspended
- Resuming
State transitions are straightforward, and ClearPortFeature/SetPortFeature requests, which move the states, appear on this figure.
The information of this figure, and the bit fields of GetPortStatus are enough to make the state machine.
Table 11-21. Port Status Field, wPortStatus
Table 11-22. Port Change Field, wPortChange
Tsuneo