Ignore:
Timestamp:
2010-10-22T14:57:03Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a7bfeb3
Parents:
954ea70
Message:

VHCD handles new methods

Not completely, though. Will finish later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/bus/usb/hcd/virtual/conndev.c

    r954ea70 rb8a3cda  
    5151                .endpoint = IPC_GET_ARG2(icall)
    5252        };
     53        size_t len = IPC_GET_ARG3(icall);
    5354       
    5455        if (!hub_can_device_signal(dev)) {
     
    6061            target.address, target.endpoint);
    6162       
    62         size_t len;
    63         void * buffer;
    64         int rc = async_data_write_accept(&buffer, false,
    65             1, USB_MAX_PAYLOAD_SIZE,
    66             0, &len);
     63        int rc;
    6764       
    68         if (rc != EOK) {
    69                 ipc_answer_0(iid, rc);
    70                 return;
     65        void * buffer = NULL;
     66        if (len > 0) {
     67                rc = async_data_write_accept(&buffer, false,
     68                    1, USB_MAX_PAYLOAD_SIZE,
     69                    0, &len);
     70               
     71                if (rc != EOK) {
     72                        ipc_answer_0(iid, rc);
     73                        return;
     74                }
    7175        }
    7276       
    73         rc = hc_fillin_transaction_from_device(USB_TRANSFER_INTERRUPT, target, buffer, len);
     77        rc = hc_fillin_transaction_from_device(target, buffer, len);
    7478       
    7579        ipc_answer_0(iid, rc);
Note: See TracChangeset for help on using the changeset viewer.