Ignore:
Timestamp:
2011-02-11T17:16:36Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4e8e1f5
Parents:
25971d2 (diff), 608afb9 (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:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h

    r25971d2 r79d2987  
    3838#include <usb/usb.h>
    3939
    40 #include "utils/malloc32.h"
    41 #include "callback.h"
    4240#include "link_pointer.h"
    4341
     
    8684        volatile uint32_t buffer_ptr;
    8785
    88         /* there is 16 bytes of data available here
    89          * those are used to store callback pointer
    90          * and next pointer. Thus, there is some free space
    91          * on 32bits systems.
     86        /* there is 16 bytes of data available here, according to UHCI
     87         * Design guide, according to linux kernel the hardware does not care
     88         * we don't use it anyway
    9289         */
    93         struct transfer_descriptor *next_va;
    94         callback_t *callback;
    9590} __attribute__((packed)) transfer_descriptor_t;
    9691
    9792
    9893void transfer_descriptor_init(transfer_descriptor_t *instance,
    99   int error_count, size_t size, bool isochronous, usb_target_t target,
    100         int pid, void *buffer);
     94    int error_count, size_t size, bool toggle, bool isochronous,
     95    usb_target_t target, int pid, void *buffer);
    10196
    102 static inline transfer_descriptor_t * transfer_descriptor_get(
    103   int error_count, size_t size, bool isochronous, usb_target_t target,
    104   int pid, void *buffer)
    105 {
    106         transfer_descriptor_t * instance =
    107           malloc32(sizeof(transfer_descriptor_t));
     97int transfer_descriptor_status(transfer_descriptor_t *instance);
    10898
    109         if (instance)
    110                 transfer_descriptor_init(
    111                   instance, error_count, size, isochronous, target, pid, buffer);
    112         return instance;
    113 }
    114 
    115 void transfer_descriptor_fini(transfer_descriptor_t *instance);
    116 
    117 static inline void transfer_descriptor_dispose(transfer_descriptor_t *instance)
     99static inline bool transfer_descriptor_is_active(
     100    transfer_descriptor_t *instance)
    118101{
    119102        assert(instance);
    120         transfer_descriptor_fini(instance);
    121         free32(instance);
    122 }
    123 
    124 static inline void transfer_descriptor_append(
    125   transfer_descriptor_t *instance, transfer_descriptor_t *item)
    126 {
    127         assert(instance);
    128         instance->next_va = item;
    129         instance->next = (uintptr_t)addr_to_phys( item ) & LINK_POINTER_ADDRESS_MASK;
     103        return (instance->status & TD_STATUS_ERROR_ACTIVE) != 0;
    130104}
    131105#endif
Note: See TracChangeset for help on using the changeset viewer.