Changes in uspace/drv/uhci-hcd/uhci_hc.c [fcc525d:ff34e5a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_hc.c
rfcc525d rff34e5a 97 97 98 98 instance->hw_interrupts = interrupts; 99 instance->hw_failures = 0;100 101 99 /* Setup UHCI function. */ 102 100 instance->ddf_instance = fun; … … 151 149 while ((pio_read_16(®isters->usbcmd) & UHCI_CMD_HCRESET) != 0); 152 150 153 /* Set frame to exactly 1ms */ 154 pio_write_8(®isters->sofmod, 64); 155 156 /* Set frame list pointer */ 151 /* Set framelist pointer */ 157 152 const uint32_t pa = addr_to_phys(instance->frame_list); 158 153 pio_write_32(®isters->flbaseadd, pa); … … 352 347 { 353 348 assert(instance); 354 /* TODO: Resume interrupts are not supported*/349 /* TODO: Check interrupt cause here */ 355 350 /* Lower 2 bits are transaction error and transaction complete */ 356 351 if (status & 0x3) { … … 359 354 transfer_list_remove_finished(&instance->transfers_control_full); 360 355 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 }378 356 } 379 357 }
Note:
See TracChangeset
for help on using the changeset viewer.