Changeset dbb9663 in mainline
- Timestamp:
- 2011-07-11T12:22:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fd0dc23
- Parents:
- 01bbbb2
- Location:
- uspace/drv/bus/usb/usbhub
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
r01bbbb2 rdbb9663 249 249 usb_log_debug("setting port count to %d\n", descriptor->ports_count); 250 250 hub_info->port_count = descriptor->ports_count; 251 bool is_power_switched = 252 ((descriptor->hub_characteristics & 1) == 0); 253 bool has_individual_port_powering = 254 ((descriptor->hub_characteristics & 1) != 0); 251 const bool is_power_switched = 252 ((descriptor->hub_characteristics & 0x2) == 0); 255 253 hub_info->ports = malloc( 256 254 sizeof (usb_hub_port_t) * (hub_info->port_count + 1)); … … 264 262 if (is_power_switched) { 265 263 usb_log_debug("Hub power switched\n"); 264 const bool has_individual_port_powering = 265 descriptor->hub_characteristics & 0x1; 266 266 267 267 if (!has_individual_port_powering) { -
uspace/drv/bus/usb/usbhub/utils.c
r01bbbb2 rdbb9663 147 147 descriptor->ports_count = sdescriptor[2]; 148 148 /// @fixme handling of endianness?? 149 descriptor->hub_characteristics = sdescriptor[ 4] + 256 * sdescriptor[3];149 descriptor->hub_characteristics = sdescriptor[3] + 256 * sdescriptor[4]; 150 150 descriptor->pwr_on_2_good_time = sdescriptor[5]; 151 151 descriptor->current_requirement = sdescriptor[6];
Note:
See TracChangeset
for help on using the changeset viewer.