Ignore:
Timestamp:
2010-12-08T23:40:38Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07b9203e
Parents:
90fb679
Message:

Fix of several stupid bugs

There were actually four (kind of) bugs fixed in this commit:

  • switched arguments in a function call (really stupid)
  • async_data_read_receive and async_data_read_finalize not paired together
  • reading wrong arguments of a call (the DDF uses IPC_GET_ARG1 for the actual method (as the IPC_GET_METHOD returns interface index) and first argument is in IPC_GET_ARG2)
  • wrong SETUP packet for GET_DESCRIPTOR request


Also, added DEV_IPC_GET_ARG[1-4] for retrieveing arguments in DDF
interfaces in less confusing way (hope so).

File:
1 edited

Legend:

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

    r90fb679 reac610e  
    108108        }
    109109
    110         devman_handle_t handle = IPC_GET_ARG1(*call);
     110        devman_handle_t handle = DEV_IPC_GET_ARG1(*call);
    111111
    112112        usb_address_t address;
     
    122122    ipc_callid_t callid, ipc_call_t *call)
    123123{
    124         ipcarg_t buffer_hash = IPC_GET_ARG1(*call);
     124        ipcarg_t buffer_hash = DEV_IPC_GET_ARG1(*call);
    125125        async_transaction_t * trans = (async_transaction_t *)buffer_hash;
    126126        if (trans == NULL) {
     
    144144                accepted_size = trans->size;
    145145        }
    146         async_data_read_finalize(callid, trans->buffer, accepted_size);
     146        async_data_read_finalize(cid, trans->buffer, accepted_size);
    147147
    148148        ipc_answer_1(callid, EOK, accepted_size);
     
    211211        }
    212212
    213         usb_address_t address = (usb_address_t) IPC_GET_ARG1(*call);
    214         devman_handle_t handle = (devman_handle_t) IPC_GET_ARG2(*call);
     213        usb_address_t address = (usb_address_t) DEV_IPC_GET_ARG1(*call);
     214        devman_handle_t handle = (devman_handle_t) DEV_IPC_GET_ARG2(*call);
    215215
    216216        int rc = usb_iface->bind_address(device, address, handle);
     
    229229        }
    230230
    231         usb_address_t address = (usb_address_t) IPC_GET_ARG1(*call);
     231        usb_address_t address = (usb_address_t) DEV_IPC_GET_ARG1(*call);
    232232
    233233        int rc = usb_iface->release_address(device, address);
     
    275275        }
    276276
    277         size_t expected_len = IPC_GET_ARG3(*call);
     277        size_t expected_len = DEV_IPC_GET_ARG3(*call);
    278278        usb_target_t target = {
    279                 .address = IPC_GET_ARG1(*call),
    280                 .endpoint = IPC_GET_ARG2(*call)
     279                .address = DEV_IPC_GET_ARG1(*call),
     280                .endpoint = DEV_IPC_GET_ARG2(*call)
    281281        };
    282282
     
    327327        }
    328328
    329         size_t len = IPC_GET_ARG3(*call);
     329        size_t len = DEV_IPC_GET_ARG3(*call);
    330330        usb_target_t target = {
    331                 .address = IPC_GET_ARG1(*call),
    332                 .endpoint = IPC_GET_ARG2(*call)
     331                .address = DEV_IPC_GET_ARG1(*call),
     332                .endpoint = DEV_IPC_GET_ARG2(*call)
    333333        };
    334334
     
    384384
    385385        usb_target_t target = {
    386                 .address = IPC_GET_ARG1(*call),
    387                 .endpoint = IPC_GET_ARG2(*call)
     386                .address = DEV_IPC_GET_ARG1(*call),
     387                .endpoint = DEV_IPC_GET_ARG2(*call)
    388388        };
    389389
Note: See TracChangeset for help on using the changeset viewer.