Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/uhci_hc.c

    rfcc525d rff34e5a  
    9797
    9898        instance->hw_interrupts = interrupts;
    99         instance->hw_failures = 0;
    100 
    10199        /* Setup UHCI function. */
    102100        instance->ddf_instance = fun;
     
    151149        while ((pio_read_16(&registers->usbcmd) & UHCI_CMD_HCRESET) != 0);
    152150
    153         /* Set frame to exactly 1ms */
    154         pio_write_8(&registers->sofmod, 64);
    155 
    156         /* Set frame list pointer */
     151        /* Set framelist pointer */
    157152        const uint32_t pa = addr_to_phys(instance->frame_list);
    158153        pio_write_32(&registers->flbaseadd, pa);
     
    352347{
    353348        assert(instance);
    354         /* TODO: Resume interrupts are not supported */
     349        /* TODO: Check interrupt cause here */
    355350        /* Lower 2 bits are transaction error and transaction complete */
    356351        if (status & 0x3) {
     
    359354                transfer_list_remove_finished(&instance->transfers_control_full);
    360355                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                 }
    378356        }
    379357}
Note: See TracChangeset for help on using the changeset viewer.