Changes in uspace/drv/usbhub/ports.c [d0c060b:361fcec] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/ports.c
rd0c060b r361fcec 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, opResult152 );153 }154 usb_port_status_set_bit(155 &status, bit_idx,false);156 }157 }158 139 if (status >> 16) { 159 140 usb_log_info("there was unsupported change on port %d: %X\n", 160 141 port, status); 142 161 143 } 162 144 } … … 240 222 "Port %zu reset complete but port not enabled.\n", 241 223 (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));249 224 } 250 225 } … … 344 319 fibril_mutex_unlock(&my_port->reset_mutex); 345 320 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 346 330 if (my_port->reset_okay) { 347 331 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.