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


Ignore:
Timestamp:
2011-03-21T10:30:06Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e45e7f, f8e1a2c
Parents:
f0fdc7d (diff), 79c8a96 (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:

Host controller refactoring, move shared stuff to libusb/host

File:
1 edited

Legend:

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

    rf0fdc7d r2e1d5d70  
    9898        usb_log_debug2("Queue %s: Adding batch(%p).\n", instance->name, batch);
    9999
    100         const uint32_t pa = addr_to_phys(batch->qh);
     100        const uint32_t pa = addr_to_phys(batch_qh(batch));
    101101        assert((pa & LINK_POINTER_ADDRESS_MASK) == pa);
    102102
    103103        /* New batch will be added to the end of the current list
    104104         * so set the link accordingly */
    105         qh_set_next_qh(batch->qh, instance->queue_head->next);
     105        qh_set_next_qh(batch_qh(batch), instance->queue_head->next);
    106106
    107107        fibril_mutex_lock(&instance->guard);
     
    117117                batch_t *last = list_get_instance(
    118118                    instance->batch_list.prev, batch_t, link);
    119                 qh_set_next_qh(last->qh, pa);
     119                qh_set_next_qh(batch_qh(last), pa);
    120120        }
    121121        /* Add to the driver list */
     
    178178                batch_t *batch = list_get_instance(current, batch_t, link);
    179179                transfer_list_remove_batch(instance, batch);
    180                 batch_abort(batch);
     180                batch_finish(batch, EIO);
    181181        }
    182182        fibril_mutex_unlock(&instance->guard);
     
    194194{
    195195        assert(instance);
     196        assert(instance->queue_head);
    196197        assert(batch);
    197         assert(instance->queue_head);
    198         assert(batch->qh);
     198        assert(batch_qh(batch));
    199199        usb_log_debug2(
    200200            "Queue %s: removing batch(%p).\n", instance->name, batch);
     
    204204        if (batch->link.prev == &instance->batch_list) {
    205205                /* I'm the first one here */
    206                 qh_set_element_qh(instance->queue_head, batch->qh->next);
     206                qh_set_element_qh(instance->queue_head, batch_qh(batch)->next);
    207207                pos = "FIRST";
    208208        } else {
    209209                batch_t *prev =
    210210                    list_get_instance(batch->link.prev, batch_t, link);
    211                 qh_set_next_qh(prev->qh, batch->qh->next);
     211                qh_set_next_qh(batch_qh(prev), batch_qh(batch)->next);
    212212                pos = "NOT FIRST";
    213213        }
     
    215215        list_remove(&batch->link);
    216216        usb_log_debug("Batch(%p) removed (%s) from %s, next element %x.\n",
    217             batch, pos, instance->name, batch->qh->next);
     217            batch, pos, instance->name, batch_qh(batch)->next);
    218218}
    219219/**
Note: See TracChangeset for help on using the changeset viewer.