Changeset dd6f59f in mainline for uspace/drv/uhci-hcd/uhci.c


Ignore:
Timestamp:
2011-03-12T12:44:59Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f3e68c
Parents:
df949c5 (diff), 0db3ad6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Minor fixes in initialization routine and hc interrupt handling

File:
1 edited

Legend:

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

    rdf949c5 rdd6f59f  
    372372        assert(instance);
    373373        /* TODO: Check interrupt cause here */
    374         transfer_list_remove_finished(&instance->transfers_interrupt);
    375         transfer_list_remove_finished(&instance->transfers_control_slow);
    376         transfer_list_remove_finished(&instance->transfers_control_full);
    377         transfer_list_remove_finished(&instance->transfers_bulk_full);
     374        /* Lower 2 bits are transaction error and transaction complete */
     375        if (status & 0x3) {
     376                transfer_list_remove_finished(&instance->transfers_interrupt);
     377                transfer_list_remove_finished(&instance->transfers_control_slow);
     378                transfer_list_remove_finished(&instance->transfers_control_full);
     379                transfer_list_remove_finished(&instance->transfers_bulk_full);
     380        }
    378381}
    379382/*----------------------------------------------------------------------------*/
     
    390393
    391394        while (1) {
     395                /* read and ack interrupts */
    392396                uint16_t status = pio_read_16(&instance->registers->usbsts);
     397                pio_write_16(&instance->registers->usbsts, 0x1f);
    393398                if (status != 0)
    394399                        usb_log_debug2("UHCI status: %x.\n", status);
    395                 status |= 1;
    396400                uhci_interrupt(instance, status);
    397                 pio_write_16(&instance->registers->usbsts, 0x1f);
    398401                async_usleep(UHCI_CLEANER_TIMEOUT);
    399402        }
Note: See TracChangeset for help on using the changeset viewer.