Changeset 98d7550 in mainline for uspace/drv/ohci/batch.c


Ignore:
Timestamp:
2011-05-18T20:18:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7941bd6
Parents:
17fc40c (diff), 030937e (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:

Doxygen and code style fixes, improve error handling in root hub registration

Remove kernel debug output in interrupt handlers accessing memory mapped registers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/batch.c

    r17fc40c r98d7550  
    100100 */
    101101usb_transfer_batch_t * batch_get(ddf_fun_t *fun, endpoint_t *ep,
    102     char *buffer, size_t buffer_size, char* setup_buffer, size_t setup_size,
     102    char *buffer, size_t buffer_size,
     103    const char *setup_buffer, size_t setup_size,
    103104    usbhc_iface_transfer_in_callback_t func_in,
    104105    usbhc_iface_transfer_out_callback_t func_out, void *arg)
     
    120121            ohci_transfer_batch_dispose);
    121122
    122         hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
     123        const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
    123124        assert(hcd_ep);
    124125
     
    129130        data->td_count =
    130131            ((buffer_size + OHCI_TD_MAX_TRANSFER - 1) / OHCI_TD_MAX_TRANSFER);
     132        /* Control transfer need Setup and Status stage */
    131133        if (ep->transfer_type == USB_TRANSFER_CONTROL) {
    132134                data->td_count += 2;
     
    407409        char *buffer = instance->data_buffer;
    408410        while (remain_size > 0) {
    409                 size_t transfer_size = remain_size > OHCI_TD_MAX_TRANSFER ?
    410                     OHCI_TD_MAX_TRANSFER : remain_size;
     411                const size_t transfer_size = remain_size > OHCI_TD_MAX_TRANSFER
     412                    ? OHCI_TD_MAX_TRANSFER : remain_size;
    411413
    412414                td_init(data->tds[td_current], instance->ep->direction,
Note: See TracChangeset for help on using the changeset viewer.