Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2011-05-18T10:59:50Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
17fc40c
Parents:
b2995c3 (diff), aeca5a3 (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:

Minor fixes and comments

UHCI: use provided barrier defines (buffer allocator should be able to use cacheable memory)
libusb: make usb enumeration routine follow USB spec more closely (wait periods)
OHCI: handle hw errors
OHCI: use provided barrier defines (buffer allocator should be able to use cacheable memory)
OHCI: reduce maximum buffer size for one transaction, this relaxes requirements on allocator providing hw accessible buffers.(memory does not have to be continuous) The only requirement that stays is the 32bit pointers limit.

File:
1 edited

Legend:

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

    rb2995c3 rf58154c5  
    3434#include <errno.h>
    3535#include <usb/debug.h>
     36#include <arch/barrier.h>
    3637
    3738#include "transfer_list.h"
     
    7172 * @param[in] instance Memory place to use.
    7273 *
    73  * Frees memory for internal qh_t structure.
     74 * Frees memory of the internal qh_t structure.
    7475 */
    7576void transfer_list_fini(transfer_list_t *instance)
     
    126127        assert((pa & LINK_POINTER_ADDRESS_MASK) == pa);
    127128
     129        /* Make sure all data in the batch are written */
     130        write_barrier();
     131
    128132        /* keep link */
    129133        batch_qh(batch)->next = last_qh->next;
    130134        qh_set_next_qh(last_qh, batch_qh(batch));
    131135
    132         asm volatile ("": : :"memory");
     136        /* Make sure the pointer is updated */
     137        write_barrier();
    133138
    134139        /* Add to the driver list */
     
    222227            == addr_to_phys(batch_qh(batch)));
    223228        prev_qh->next = batch_qh(batch)->next;
    224         asm volatile ("": : :"memory");
     229
     230        /* Make sure the pointer is updated */
     231        write_barrier();
     232
    225233        /* Remove from the batch list */
    226234        list_remove(&batch->link);
Note: See TracChangeset for help on using the changeset viewer.