Changeset 423e8c81 in mainline for uspace/drv/uhci-hcd/batch.c


Ignore:
Timestamp:
2011-02-19T23:41:38Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
063ead6f, 41e645c, 62066b4
Parents:
374552ef (diff), fb78ae72 (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:

Use hardware interrupts instead of polling

NOTE: hw interrupt enabling is implemented in pciintel driver,
it's probably not done ddf-way, but it works and can be used by other drivers too.

File:
1 edited

Legend:

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

    r374552ef r423e8c81  
    141141        usb_log_debug("Checking(%p) %d packet for completion.\n",
    142142            instance, instance->packets);
    143         /* This is just an ugly trick to support the old API */
    144143        instance->transfered_size = 0;
    145144        size_t i = 0;
     
    157156                    transfer_descriptor_actual_size(&instance->tds[i]);
    158157        }
     158        /* This is just an ugly trick to support the old API */
    159159        instance->transfered_size -= instance->setup_size;
    160160        return true;
     
    191191            0, 1, false, instance->target, USB_PID_IN, NULL, NULL);
    192192
     193        instance->tds[i].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG;
     194
    193195        instance->next_step = batch_call_out_and_dispose;
    194196        batch_schedule(instance);
     
    221223        transfer_descriptor_init(&instance->tds[i], DEFAULT_ERROR_COUNT,
    222224            0, 1, false, instance->target, USB_PID_OUT, NULL, NULL);
     225
     226        instance->tds[i].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG;
    223227
    224228        instance->next_step = batch_call_in_and_dispose;
     
    244248        }
    245249
     250        instance->tds[i - 1].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG;
     251
    246252        instance->next_step = batch_call_in_and_dispose;
    247253        batch_schedule(instance);
     
    268274        }
    269275
     276        instance->tds[i - 1].status |= TD_STATUS_COMPLETE_INTERRUPT_FLAG;
     277
    270278        instance->next_step = batch_call_out_and_dispose;
    271279        batch_schedule(instance);
Note: See TracChangeset for help on using the changeset viewer.