Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (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.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/endpoint_list.c

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    5758        instance->list_head = malloc32(sizeof(ed_t));
    5859        if (!instance->list_head) {
    59                 usb_log_error("Failed to allocate list head.\n");
     60                usb_log_error("Failed to allocate list head.");
    6061                return ENOMEM;
    6162        }
    6263        instance->list_head_pa = addr_to_phys(instance->list_head);
    63         usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).\n",
     64        usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).",
    6465            name, instance->list_head, instance->list_head_pa);
    6566
     
    9697        assert(instance);
    9798        assert(ep);
    98         usb_log_debug2("Queue %s: Adding endpoint(%p).\n", instance->name, ep);
     99        usb_log_debug2("Queue %s: Adding endpoint(%p).", instance->name, ep);
    99100
    100101        fibril_mutex_lock(&instance->guard);
     
    108109                /* There are active EDs, get the last one */
    109110                ohci_endpoint_t *last = list_get_instance(
    110                     list_last(&instance->endpoint_list), ohci_endpoint_t, link);
     111                    list_last(&instance->endpoint_list), ohci_endpoint_t, eplist_link);
    111112                last_ed = last->ed;
    112113        }
     
    122123
    123124        /* Add to the sw list */
    124         list_append(&ep->link, &instance->endpoint_list);
     125        list_append(&ep->eplist_link, &instance->endpoint_list);
    125126
    126127        ohci_endpoint_t *first = list_get_instance(
    127             list_first(&instance->endpoint_list), ohci_endpoint_t, link);
    128         usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).\n",
     128            list_first(&instance->endpoint_list), ohci_endpoint_t, eplist_link);
     129        usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).",
    129130                ep, instance->name, first, first->ed);
    130131        if (last_ed == instance->list_head) {
    131                 usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.\n",
     132                usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.",
    132133                    instance->name, last_ed, instance->list_head_pa,
    133134                    last_ed->status, last_ed->td_tail, last_ed->td_head,
     
    151152        fibril_mutex_lock(&instance->guard);
    152153
    153         usb_log_debug2("Queue %s: removing endpoint(%p).\n", instance->name, ep);
     154        usb_log_debug2("Queue %s: removing endpoint(%p).", instance->name, ep);
    154155
    155156        const char *qpos = NULL;
    156157        ed_t *prev_ed;
    157158        /* Remove from the hardware queue */
    158         if (list_first(&instance->endpoint_list) == &ep->link) {
     159        if (list_first(&instance->endpoint_list) == &ep->eplist_link) {
    159160                /* I'm the first one here */
    160161                prev_ed = instance->list_head;
     
    162163        } else {
    163164                ohci_endpoint_t *prev =
    164                     list_get_instance(ep->link.prev, ohci_endpoint_t, link);
     165                    list_get_instance(ep->eplist_link.prev, ohci_endpoint_t, eplist_link);
    165166                prev_ed = prev->ed;
    166167                qpos = "NOT FIRST";
     
    171172        write_barrier();
    172173
    173         usb_log_debug("HCD EP(%p) removed (%s) from %s, next %x.\n",
     174        usb_log_debug("HCD EP(%p) removed (%s) from %s, next %x.",
    174175            ep, qpos, instance->name, ep->ed->next);
    175176
    176177        /* Remove from the endpoint list */
    177         list_remove(&ep->link);
     178        list_remove(&ep->eplist_link);
    178179        fibril_mutex_unlock(&instance->guard);
    179180}
Note: See TracChangeset for help on using the changeset viewer.