Changeset 53338bda in mainline


Ignore:
Timestamp:
2011-02-11T17:59:34Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f6309b6
Parents:
518372c
Message:

remove transfers from the list

Location:
uspace/drv/uhci-hcd
Files:
5 edited

Legend:

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

    r518372c r53338bda  
    3737
    3838#include "tracker.h"
     39#include "transfer_list.h"
    3940#include "uhci.h"
    4041#include "utils/malloc32.h"
     
    387388        assert(instance);
    388389        tracker_call_in(instance);
     390        transfer_list_remove_tracker(instance->scheduled_list, instance);
    389391        free32(instance->td);
    390392        free32(instance->packet);
     
    396398        assert(instance);
    397399        tracker_call_out(instance);
     400        assert(instance->scheduled_list);
     401        transfer_list_remove_tracker(instance->scheduled_list, instance);
    398402        free32(instance->td);
    399403        free32(instance->packet);
  • uspace/drv/uhci-hcd/tracker.h

    r518372c r53338bda  
    4747} dev_speed_t;
    4848
     49struct transfer_list;
     50
    4951typedef struct tracker
    5052{
     
    6870        void (*next_step)(struct tracker*);
    6971        unsigned toggle:1;
     72
     73        struct transfer_list *scheduled_list;
    7074} tracker_t;
    7175
  • uspace/drv/uhci-hcd/transfer_list.c

    r518372c r53338bda  
    100100        }
    101101}
     102/*----------------------------------------------------------------------------*/
     103void transfer_list_remove_tracker(transfer_list_t *instance, tracker_t *tracker)
     104{
     105        assert(instance);
     106        assert(tracker);
     107        assert(instance->queue_head);
     108        assert(tracker->td);
     109
     110        uint32_t pa = (uintptr_t)addr_to_phys(tracker->td);
     111        if ((instance->queue_head->element & LINK_POINTER_ADDRESS_MASK) == pa) {
     112                instance->queue_head->element = tracker->td->next;
     113        }
     114}
    102115/**
    103116 * @}
  • uspace/drv/uhci-hcd/transfer_list.h

    r518372c r53338bda  
    3636
    3737#include "uhci_struct/queue_head.h"
     38
    3839#include "tracker.h"
    3940
     
    5253void transfer_list_set_next(transfer_list_t *instance, transfer_list_t *next);
    5354
     55
    5456static inline void transfer_list_fini(transfer_list_t *instance)
    5557{
     
    5860}
    5961
     62void transfer_list_add_tracker(transfer_list_t *instance, tracker_t *tracker);
    6063
    61 void transfer_list_add_tracker(transfer_list_t *instance, tracker_t *tracker);
     64void transfer_list_remove_tracker(transfer_list_t *instance, tracker_t *track);
    6265
    6366#endif
  • uspace/drv/uhci-hcd/uhci.c

    r518372c r53338bda  
    178178        list_append(&tracker->link, &instance->tracker_list);
    179179
     180        tracker->scheduled_list = list;
     181
    180182        usb_log_debug2("Scheduler(%d) releasing tracker list mutex.\n",
    181183            fibril_get_id());
Note: See TracChangeset for help on using the changeset viewer.