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


Ignore:
Timestamp:
2011-02-28T13:04:21Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b5644c, 494eaf7, 51b46f2
Parents:
81c508c (diff), dced52a (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:

hc and rh work

Support for low speed devices
RH iospace obtained from parent hc driver
proper hc initialization
Debug messages reworked
intelpci adressspace size fix (read the warning)

File:
1 edited

Legend:

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

    r81c508c rcc44f7e  
    7070        assert(instance);
    7171        assert(batch);
     72        usb_log_debug2("Adding batch(%p) to queue %s.\n", batch, instance->name);
    7273
    7374        uint32_t pa = (uintptr_t)addr_to_phys(batch->qh);
     
    8384                list_append(&batch->link, &instance->batch_list);
    8485                instance->queue_head->element = pa;
    85                 usb_log_debug2("Added batch(%p) to queue %s first.\n",
     86                usb_log_debug("Batch(%p) added to queue %s first.\n",
    8687                        batch, instance->name);
    8788                fibril_mutex_unlock(&instance->guard);
     
    9697        queue_head_append_qh(last->qh, pa);
    9798        list_append(&batch->link, &instance->batch_list);
    98         usb_log_debug2("Added batch(%p) to queue %s last, first is %p.\n",
     99        usb_log_debug("Batch(%p) added to queue %s last, first is %p.\n",
    99100                batch, instance->name, first );
    100101        fibril_mutex_unlock(&instance->guard);
     
    108109        assert(instance->queue_head);
    109110        assert(batch->qh);
     111        usb_log_debug2("Removing batch(%p) from queue %s.\n", batch, instance->name);
    110112
    111113        /* I'm the first one here */
    112114        if (batch->link.prev == &instance->batch_list) {
    113                 usb_log_debug("Removing batch %p was first, next element %x.\n",
    114                         batch, batch->qh->next_queue);
     115                usb_log_debug("Batch(%p) removed (FIRST) from queue %s, next element %x.\n",
     116                        batch, instance->name, batch->qh->next_queue);
    115117                instance->queue_head->element = batch->qh->next_queue;
    116118        } else {
    117                 usb_log_debug("Removing batch %p was NOT first, next element %x.\n",
    118                         batch, batch->qh->next_queue);
     119                usb_log_debug("Batch(%p) removed (NOT FIRST) from queue, next element %x.\n",
     120                        batch, instance->name, batch->qh->next_queue);
    119121                batch_t *prev = list_get_instance(batch->link.prev, batch_t, link);
    120122                prev->qh->next_queue = batch->qh->next_queue;
     
    123125}
    124126/*----------------------------------------------------------------------------*/
    125 void transfer_list_check(transfer_list_t *instance)
     127void transfer_list_remove_finished(transfer_list_t *instance)
    126128{
    127129        assert(instance);
     130
     131        LIST_INITIALIZE(done);
     132
    128133        fibril_mutex_lock(&instance->guard);
    129134        link_t *current = instance->batch_list.next;
     
    134139                if (batch_is_complete(batch)) {
    135140                        transfer_list_remove_batch(instance, batch);
    136                         batch->next_step(batch);
     141                        list_append(current, &done);
    137142                }
    138143                current = next;
    139144        }
    140145        fibril_mutex_unlock(&instance->guard);
     146
     147        while (!list_empty(&done)) {
     148                link_t *item = done.next;
     149                list_remove(item);
     150                batch_t *batch = list_get_instance(item, batch_t, link);
     151                batch->next_step(batch);
     152        }
    141153}
    142154/**
Note: See TracChangeset for help on using the changeset viewer.