Changeset d0c060b in mainline for uspace/drv/usbhub/ports.c
- Timestamp:
- 2011-05-06T15:40:46Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b543d5
- Parents:
- 26f6094
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/ports.c
r26f6094 rd0c060b 137 137 &status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT,false); 138 138 /// \TODO what about port power change? 139 unsigned int bit_idx; 140 for(bit_idx = 16;bit_idx<32;++bit_idx){ 141 if(status & (1<<bit_idx)){ 142 usb_log_info( 143 "there was unsupported change on port %d: %d\n", 144 port, bit_idx); 145 int opResult = usb_hub_clear_port_feature( 146 hub->control_pipe, 147 port, USB_HUB_FEATURE_C_PORT_CONNECTION); 148 if (opResult != EOK) { 149 usb_log_warning( 150 "could not clear port flag %d: %d\n", 151 bit_idx, opResult 152 ); 153 } 154 usb_port_status_set_bit( 155 &status, bit_idx,false); 156 } 157 } 139 158 if (status >> 16) { 140 159 usb_log_info("there was unsupported change on port %d: %X\n", 141 160 port, status); 142 143 161 } 144 162 } … … 222 240 "Port %zu reset complete but port not enabled.\n", 223 241 (size_t) port); 242 } 243 /* Clear the port reset change. */ 244 int rc = usb_hub_clear_port_feature(hub->control_pipe, 245 port, USB_HUB_FEATURE_C_PORT_RESET); 246 if (rc != EOK) { 247 usb_log_error("Failed to clear port %d reset feature: %s.\n", 248 port, str_error(rc)); 224 249 } 225 250 } … … 319 344 fibril_mutex_unlock(&my_port->reset_mutex); 320 345 321 /* Clear the port reset change. */322 rc = usb_hub_clear_port_feature(hub->control_pipe,323 port_no, USB_HUB_FEATURE_C_PORT_RESET);324 if (rc != EOK) {325 usb_log_error("Failed to clear port %d reset feature: %s.\n",326 port_no, str_error(rc));327 return rc;328 }329 330 346 if (my_port->reset_okay) { 331 347 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.