Changeset 5fd9c30 in mainline for uspace/drv/bus/usb/ehci/ehci_rh.c


Ignore:
Timestamp:
2017-10-21T20:52:56Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
766043c
Parents:
74b852b
Message:

usbhost refactoring: let transfer_batch be initialized by bus

Currently makes older HCs fail, work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_rh.c

    r74b852b r5fd9c30  
    146146        const usb_target_t target = batch->ep->target;
    147147        batch->error = virthub_base_request(&instance->base, target,
    148             usb_transfer_batch_direction(batch), (void*)batch->setup_buffer,
     148            batch->dir, (void*) batch->setup.buffer,
    149149            batch->buffer, batch->buffer_size, &batch->transfered_size);
    150150        if (batch->error == ENAK) {
     
    157157                instance->unfinished_interrupt_transfer = batch;
    158158        } else {
    159                 usb_transfer_batch_finish(batch, NULL);
    160                 usb_transfer_batch_destroy(batch);
    161159                usb_log_debug("RH(%p): BATCH(%p) virtual request complete: %s",
    162160                    instance, batch, str_error(batch->error));
     161                usb_transfer_batch_finish(batch);
    163162        }
    164163        return EOK;
     
    182181                const usb_target_t target = batch->ep->target;
    183182                batch->error = virthub_base_request(&instance->base, target,
    184                     usb_transfer_batch_direction(batch),
    185                     (void*)batch->setup_buffer,
     183                    batch->dir, (void*) batch->setup.buffer,
    186184                    batch->buffer, batch->buffer_size, &batch->transfered_size);
    187                 usb_transfer_batch_finish(batch, NULL);
    188                 usb_transfer_batch_destroy(batch);
     185                usb_transfer_batch_finish(batch);
    189186        }
    190187        return EOK;
Note: See TracChangeset for help on using the changeset viewer.