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


Ignore:
Timestamp:
2011-03-29T12:09:15Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d012590
Parents:
841e6e5 (diff), 51e5608 (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:

development merge - mainline changes

File:
1 edited

Legend:

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

    r841e6e5 r79e1abd  
    5858        }
    5959        instance->queue_head_pa = addr_to_phys(instance->queue_head);
     60        usb_log_debug2("Transfer list %s setup with QH: %p(%p).\n",
     61            name, instance->queue_head, instance->queue_head_pa);
    6062
    6163        qh_init(instance->queue_head);
     
    118120        qh_set_next_qh(last_qh, pa);
    119121
     122        asm volatile ("": : :"memory");
     123
    120124        /* Add to the driver list */
    121125        list_append(&batch->link, &instance->batch_list);
     
    137141 * this transfer list leading to the deadlock if its done inline.
    138142 */
    139 void transfer_list_remove_finished(transfer_list_t *instance)
    140 {
    141         assert(instance);
    142 
    143         LIST_INITIALIZE(done);
     143void transfer_list_remove_finished(transfer_list_t *instance, link_t *done)
     144{
     145        assert(instance);
     146        assert(done);
    144147
    145148        fibril_mutex_lock(&instance->guard);
     
    153156                        /* Save for post-processing */
    154157                        transfer_list_remove_batch(instance, batch);
    155                         list_append(current, &done);
     158                        list_append(current, done);
    156159                }
    157160                current = next;
     
    159162        fibril_mutex_unlock(&instance->guard);
    160163
    161         while (!list_empty(&done)) {
    162                 link_t *item = done.next;
    163                 list_remove(item);
    164                 usb_transfer_batch_t *batch =
    165                     list_get_instance(item, usb_transfer_batch_t, link);
    166                 batch->next_step(batch);
    167         }
    168164}
    169165/*----------------------------------------------------------------------------*/
     
    222218                qpos = "NOT FIRST";
    223219        }
     220        asm volatile ("": : :"memory");
    224221        /* Remove from the batch list */
    225222        list_remove(&batch->link);
Note: See TracChangeset for help on using the changeset viewer.