Ignore:
Timestamp:
2017-11-14T12:24:42Z (6 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6cad776
Parents:
887c9de (diff), d2d142a (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.
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 01:04:19)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 12:24:42)
Message:

Merge tag '0.7.1'

The merge wasn't clean, because of changes in build system. The most
significant change was partial revert of usbhc callback refactoring,
which now does not take usb transfer batch, but few named fields again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    r887c9de rf9d0a86  
    3939#include <errno.h>
    4040#include <devman.h>
    41 #include <usb/host/usb_transfer_batch.h>
    4241
    4342#include "usbhc_iface.h"
     
    445444}
    446445
    447 static int callback_out(usb_transfer_batch_t *batch)
    448 {
    449         async_transaction_t *trans = batch->on_complete_data;
    450 
    451         const int err = async_answer_0(trans->caller, batch->error);
     446static int callback_out(void *arg, int error, size_t transfered_size)
     447{
     448        async_transaction_t *trans = arg;
     449
     450        const int err = async_answer_0(trans->caller, error);
    452451
    453452        async_transaction_destroy(trans);
     
    456455}
    457456
    458 static int callback_in(usb_transfer_batch_t *batch)
    459 {
    460         async_transaction_t *trans = batch->on_complete_data;
     457static int callback_in(void *arg, int error, size_t transfered_size)
     458{
     459        async_transaction_t *trans = arg;
    461460
    462461        if (trans->data_caller) {
    463                 if (batch->error == EOK) {
    464                         batch->error = async_data_read_finalize(trans->data_caller,
    465                             trans->buffer, batch->transfered_size);
     462                if (error == EOK) {
     463                        error = async_data_read_finalize(trans->data_caller,
     464                            trans->buffer, transfered_size);
    466465                } else {
    467466                        async_answer_0(trans->data_caller, EINTR);
     
    469468        }
    470469
    471         const int err = async_answer_0(trans->caller, batch->error);
     470        const int err = async_answer_0(trans->caller, error);
    472471        async_transaction_destroy(trans);
    473472        return err;
Note: See TracChangeset for help on using the changeset viewer.