Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6f122df in mainline


Ignore:
Timestamp:
2011-04-22T21:25:19Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
77d10f0
Parents:
9bff1ea
Message:

Add more comments about qemu interrupt bug

Remove some redundant pointer casts.

File:
1 edited

Legend:

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

    r9bff1ea r6f122df  
    330330{
    331331        assert(instance);
    332 //      status |= 1; //Uncomment to work around qemu hang
    333332        /* Lower 2 bits are transaction error and transaction complete */
    334333        if (status & (UHCI_STATUS_INTERRUPT | UHCI_STATUS_ERROR_INTERRUPT)) {
     
    380379{
    381380        usb_log_debug("Started interrupt emulator.\n");
    382         hc_t *instance = (hc_t*)arg;
     381        hc_t *instance = arg;
    383382        assert(instance);
    384383
    385384        while (1) {
    386                 /* Readd and clear status register */
     385                /* Read and clear status register */
    387386                uint16_t status = pio_read_16(&instance->registers->usbsts);
    388387                pio_write_16(&instance->registers->usbsts, status);
    389388                if (status != 0)
    390389                        usb_log_debug2("UHCI status: %x.\n", status);
     390// Qemu fails to report stalled communication
     391// see https://bugs.launchpad.net/qemu/+bug/757654
     392// This is a simple workaround to force queue processing every time
     393        //      status |= 1;
    391394                hc_interrupt(instance, status);
    392395                async_usleep(UHCI_INT_EMULATOR_TIMEOUT);
     
    402405int hc_debug_checker(void *arg)
    403406{
    404         hc_t *instance = (hc_t*)arg;
     407        hc_t *instance = arg;
    405408        assert(instance);
    406409
Note: See TracChangeset for help on using the changeset viewer.