Changeset a60150a in mainline


Ignore:
Timestamp:
2011-03-06T18:54:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8a20380
Parents:
57c0a7e
Message:

Track toggle on errors

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

Legend:

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

    r57c0a7e ra60150a  
    5454static void batch_call_in_and_dispose(batch_t *instance);
    5555static void batch_call_out_and_dispose(batch_t *instance);
     56static void batch_dispose(batch_t *instance);
    5657
    5758
     
    163164                        usb_log_debug("Batch(%p) found error TD(%d):%x.\n",
    164165                            instance, i, instance->tds[i].status);
     166
     167                        device_keeper_set_toggle(instance->manager, instance->target,
     168                            td_toggle(&instance->tds[i]));
    165169                        if (i > 0)
    166170                                goto substract_ret;
     
    352356        assert(instance);
    353357        batch_call_in(instance);
     358        batch_dispose(instance);
     359}
     360/*----------------------------------------------------------------------------*/
     361void batch_call_out_and_dispose(batch_t *instance)
     362{
     363        assert(instance);
     364        batch_call_out(instance);
     365        batch_dispose(instance);
     366}
     367/*----------------------------------------------------------------------------*/
     368void batch_dispose(batch_t *instance)
     369{
     370        assert(instance);
    354371        usb_log_debug("Batch(%p) disposing.\n", instance);
    355372        free32(instance->tds);
     
    360377}
    361378/*----------------------------------------------------------------------------*/
    362 void batch_call_out_and_dispose(batch_t *instance)
    363 {
    364         assert(instance);
    365         batch_call_out(instance);
    366         usb_log_debug("Batch(%p) disposing.\n", instance);
    367         free32(instance->tds);
    368         free32(instance->qh);
    369         free32(instance->setup_buffer);
    370         free32(instance->transport_buffer);
    371         free(instance);
    372 }
    373 /*----------------------------------------------------------------------------*/
    374379int batch_schedule(batch_t *instance)
    375380{
  • uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h

    r57c0a7e ra60150a  
    115115}
    116116
     117static inline int td_toggle(td_t *instance)
     118{
     119        assert(instance);
     120        return ((instance->device & TD_DEVICE_DATA_TOGGLE_ONE_FLAG) != 0)
     121            ? 1 : 0;
     122}
     123
    117124static inline bool td_is_active(td_t *instance)
    118125{
Note: See TracChangeset for help on using the changeset viewer.