Changes in uspace/drv/uhci-hcd/uhci_hc.c [ff34e5a:fcc525d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_hc.c
rff34e5a rfcc525d 97 97 98 98 instance->hw_interrupts = interrupts; 99 instance->hw_failures = 0; 100 99 101 /* Setup UHCI function. */ 100 102 instance->ddf_instance = fun; … … 149 151 while ((pio_read_16(®isters->usbcmd) & UHCI_CMD_HCRESET) != 0); 150 152 151 /* Set framelist pointer */ 153 /* Set frame to exactly 1ms */ 154 pio_write_8(®isters->sofmod, 64); 155 156 /* Set frame list pointer */ 152 157 const uint32_t pa = addr_to_phys(instance->frame_list); 153 158 pio_write_32(®isters->flbaseadd, pa); … … 347 352 { 348 353 assert(instance); 349 /* TODO: Check interrupt cause here*/354 /* TODO: Resume interrupts are not supported */ 350 355 /* Lower 2 bits are transaction error and transaction complete */ 351 356 if (status & 0x3) { … … 354 359 transfer_list_remove_finished(&instance->transfers_control_full); 355 360 transfer_list_remove_finished(&instance->transfers_bulk_full); 361 } 362 /* bits 4 and 5 indicate hc error */ 363 if (status & 0x18) { 364 usb_log_error("UHCI hardware failure!.\n"); 365 ++instance->hw_failures; 366 transfer_list_abort_all(&instance->transfers_interrupt); 367 transfer_list_abort_all(&instance->transfers_control_slow); 368 transfer_list_abort_all(&instance->transfers_control_full); 369 transfer_list_abort_all(&instance->transfers_bulk_full); 370 371 if (instance->hw_failures < UHCI_ALLOWED_HW_FAIL) { 372 /* reinitialize hw, this triggers virtual disconnect*/ 373 uhci_hc_init_hw(instance); 374 } else { 375 usb_log_fatal("Too many UHCI hardware failures!.\n"); 376 uhci_hc_fini(instance); 377 } 356 378 } 357 379 }
Note:
See TracChangeset
for help on using the changeset viewer.