Changeset 68a61f19 in mainline


Ignore:
Timestamp:
2015-06-29T01:46:59Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f6f2a5f7
Parents:
c86ca9a
Message:

ehci, endpoint_list: Fix querying PA before the memory has been accessed


modified:

uspace/drv/bus/usb/ehci/endpoint_list.c

File:
1 edited

Legend:

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

    rc86ca9a r68a61f19  
    6060                return ENOMEM;
    6161        }
     62        /* Make sure the address translation exists by initializing first */
     63        qh_init(instance->list_head, NULL);
     64
    6265        instance->list_head_pa = addr_to_phys(instance->list_head);
     66        list_initialize(&instance->endpoint_list);
    6367        usb_log_debug2("Transfer list %s setup with ED: %p(0x%0" PRIx32 ")).\n",
    6468            name, instance->list_head, instance->list_head_pa);
    6569
    66         qh_init(instance->list_head, NULL);
    67         list_initialize(&instance->endpoint_list);
    6870        fibril_mutex_initialize(&instance->guard);
    6971        return EOK;
     
    108110        }
    109111        assert(last_qh);
    110         /* Keep link */
     112        /* Keep link, this might point to the queue QH, or next chained queue */
    111113        ep->qh->horizontal = last_qh->horizontal;
    112114        /* Make sure QH update is written to the memory */
     
    156158                qpos = "FIRST";
    157159        } else {
    158                 ehci_endpoint_t *prev =
    159                     list_get_instance(ep->link.prev, ehci_endpoint_t, link);
    160                 prev_qh = prev->qh;
     160                prev_qh = ehci_endpoint_list_instance(ep->link.prev)->qh;
    161161                qpos = "NOT FIRST";
    162162        }
Note: See TracChangeset for help on using the changeset viewer.