Changeset 11349a85 in mainline
- Timestamp:
- 2011-05-08T19:02:07Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 511cfc8
- Parents:
- 8855939
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/port.c
r8855939 r11349a85 212 212 213 213 /* 214 * Resets from root ports should be nominally 50ms 214 * Resets from root ports should be nominally 50ms (USB spec 7.1.7.3) 215 215 */ 216 216 { … … 223 223 port_status &= ~STATUS_IN_RESET; 224 224 uhci_port_write_status(port, port_status); 225 usb_log_debug("%s: Reset Signal stop.\n", port->id_string); 226 } 227 225 while (uhci_port_read_status(port) & STATUS_IN_RESET); 226 // TODO: find a better way to waste time (it should be less than 227 // 10ms, if we reschedule it takes too much time (random 228 // interrupts can be solved by multiple attempts). 229 usb_log_debug2("%s: Reset Signal stop.\n", port->id_string); 230 } 228 231 /* Enable the port. */ 229 232 uhci_port_set_enabled(port, true); 233 234 /* Reset recovery period, 235 * devices do not have to respond during this period 236 */ 237 async_usleep(10000); 230 238 return EOK; 231 239 } … … 246 254 usb_log_debug("%s: Detected new device.\n", port->id_string); 247 255 256 int ret, count = 0; 248 257 usb_address_t dev_addr; 249 int ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 250 speed, uhci_port_reset_enable, port->number, port, 251 &dev_addr, &port->attached_device, NULL, NULL, NULL); 258 do { 259 ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 260 speed, uhci_port_reset_enable, port->number, port, 261 &dev_addr, &port->attached_device, NULL, NULL, NULL); 262 } while (ret != EOK && ++count < 4); 252 263 253 264 if (ret != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.