Changeset 0db3ad6 in mainline


Ignore:
Timestamp:
2011-03-12T12:39:43Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f810b3, dd6f59f
Parents:
fb1d4990
Message:

Only check connections of there is a chance for a finished one

Set IOC on the last packet of data transfer

Location:
uspace/drv/uhci-hcd
Files:
3 edited

Legend:

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

    rfb1d4990 r0db3ad6  
    318318                ++packet;
    319319        }
     320        instance->tds[packet - 1].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG;
    320321        device_keeper_set_toggle(instance->manager, instance->target, toggle);
    321322}
  • uspace/drv/uhci-hcd/uhci.c

    rfb1d4990 r0db3ad6  
    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        }
  • uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h

    rfb1d4990 r0db3ad6  
    9191
    9292
    93 void td_init(td_t *instance, int error_count, size_t size, bool toggle, bool iso,
    94     bool low_speed, usb_target_t target, usb_packet_id pid, void *buffer,
    95     td_t *next);
     93void td_init(td_t *instance, int error_count, size_t size, bool toggle,
     94    bool iso, bool low_speed, usb_target_t target, usb_packet_id pid,
     95    void *buffer, td_t *next);
    9696
    9797int td_status(td_t *instance);
Note: See TracChangeset for help on using the changeset viewer.