Changeset eac610e in mainline for uspace/lib/usb/src/usbdrvreq.c


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/usb/src/usbdrvreq.c

    r90fb679 reac610e  
    117117        /* Prepare the setup packet. */
    118118        usb_device_request_setup_packet_t setup_packet = {
    119                 .request_type = 0,
     119                .request_type = 128,
    120120                .request = USB_DEVREQ_GET_DESCRIPTOR,
    121121                .index = 0,
     
    130130        /* Start the control read transfer. */
    131131        rc = usb_drv_async_control_read_setup(phone, target,
    132             &setup_packet, sizeof(setup_packet), &handle);
     132            &setup_packet, sizeof(usb_device_request_setup_packet_t), &handle);
    133133        if (rc != EOK) {
    134134                return rc;
Note: See TracChangeset for help on using the changeset viewer.