Changeset fcc525d in mainline
- Timestamp:
- 2011-03-17T13:49:20Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0fd82c9, 3036735
- Parents:
- 87037c48
- Location:
- uspace/drv/uhci-hcd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_hc.c
r87037c48 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; … … 360 362 /* bits 4 and 5 indicate hc error */ 361 363 if (status & 0x18) { 364 usb_log_error("UHCI hardware failure!.\n"); 365 ++instance->hw_failures; 362 366 transfer_list_abort_all(&instance->transfers_interrupt); 363 367 transfer_list_abort_all(&instance->transfers_control_slow); 364 368 transfer_list_abort_all(&instance->transfers_control_full); 365 369 transfer_list_abort_all(&instance->transfers_bulk_full); 366 /* reinitialize hw, this triggers virtual disconnect*/ 367 uhci_hc_init_hw(instance); 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 } 368 378 } 369 379 } -
uspace/drv/uhci-hcd/uhci_hc.h
r87037c48 rfcc525d 80 80 #define UHCI_CLEANER_TIMEOUT 10000 81 81 #define UHCI_DEBUGER_TIMEOUT 5000000 82 #define UHCI_ALLOWED_HW_FAIL 5 82 83 83 84 typedef struct uhci_hc { … … 100 101 fid_t debug_checker; 101 102 bool hw_interrupts; 103 unsigned hw_failures; 102 104 103 105 ddf_fun_t *ddf_instance;
Note:
See TracChangeset
for help on using the changeset viewer.