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


Ignore:
Timestamp:
2011-02-04T14:45:42Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dcef3669
Parents:
97e87de
Message:

New UHCI packet scheduler

queues are named for nicer debug output
slow_speed is set by iface functions

File:
1 edited

Legend:

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

    r97e87de r881c47b  
    3838#include "transfer_list.h"
    3939
    40 int transfer_list_init(transfer_list_t *instance, transfer_list_t *next)
     40int transfer_list_init(transfer_list_t *instance, const char *name)
    4141{
    4242        assert(instance);
    4343        instance->first = NULL;
    4444        instance->last = NULL;
     45        instance->next = NULL;
     46        instance->name = name;
    4547        instance->queue_head = queue_head_get();
    4648        if (!instance->queue_head) {
     
    5052        instance->queue_head_pa = (uintptr_t)addr_to_phys(instance->queue_head);
    5153
    52         uint32_t next_pa = next ? next->queue_head_pa : 0;
    53         queue_head_init(instance->queue_head, next_pa);
     54        queue_head_init(instance->queue_head);
    5455        return EOK;
     56}
     57/*----------------------------------------------------------------------------*/
     58void transfer_list_set_next(transfer_list_t *instance, transfer_list_t *next)
     59{
     60        assert(instance);
     61        assert(next);
     62        instance->next = next;
     63        if (!instance->queue_head)
     64                return;
     65        queue_head_add_next(instance->queue_head, next->queue_head_pa);
    5566}
    5667/*----------------------------------------------------------------------------*/
     
    8192                instance->queue_head->element = (pa & LINK_POINTER_ADDRESS_MASK);
    8293        }
    83         usb_log_debug("Successfully added transfer to the hc queue %p.\n",
    84           instance);
     94        usb_log_debug("Successfully added transfer to the hc queue %S.\n",
     95          instance->name);
    8596        return EOK;
    8697}
Note: See TracChangeset for help on using the changeset viewer.