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


Ignore:
Timestamp:
2017-10-21T20:52:56Z (7 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/hc.c

    r74b852b r5fd9c30  
    296296                return ehci_rh_schedule(&instance->rh, batch);
    297297        }
     298
    298299        ehci_transfer_batch_t *ehci_batch = ehci_transfer_batch_get(batch);
    299         if (!ehci_batch)
    300                 return ENOMEM;
     300
     301        const int err = ehci_transfer_batch_prepare(ehci_batch);
     302        if (err)
     303                return err;
    301304
    302305        fibril_mutex_lock(&instance->guard);
     
    343346                            ehci_transfer_batch_from_link(current);
    344347
    345                         if (ehci_transfer_batch_is_complete(batch)) {
     348                        if (ehci_transfer_batch_check_completed(batch)) {
    346349                                list_remove(current);
    347                                 ehci_transfer_batch_finish_dispose(batch);
     350                                usb_transfer_batch_finish(&batch->base);
    348351                        }
    349352                }
Note: See TracChangeset for help on using the changeset viewer.