Changeset df8f3fa in mainline for uspace/lib/usbhost/src


Ignore:
Timestamp:
2011-08-24T13:32:47Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5fe0a697
Parents:
31bc40e
Message:

Fix: only reset ep if the control transfer was sucessful.

Location:
uspace/lib/usbhost/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/batch.c

    r31bc40e rdf8f3fa  
    3838#include <usb/debug.h>
    3939#include <usb/host/batch.h>
     40#include <usb/host/hcd.h>
    4041
    4142void usb_transfer_batch_call_in(usb_transfer_batch_t *instance);
     
    150151            str_error(instance->error));
    151152
     153        if (instance->ep->transfer_type == USB_TRANSFER_CONTROL
     154            && instance->error == EOK) {
     155                usb_target_t target =
     156                    {instance->ep->address, instance->ep->endpoint};
     157                reset_ep_if_need(
     158                    fun_to_hcd(instance->fun), target, instance->setup_buffer);
     159        }
     160
    152161        instance->callback_out(instance->fun,
    153162            instance->error, instance->arg);
  • uspace/lib/usbhost/src/iface.c

    r31bc40e rdf8f3fa  
    117117        assert(address);
    118118
    119         usb_log_debug("Address request with speed %d.\n", speed);
     119        usb_log_debug("Address request speed: %s.\n", usb_str_speed(speed));
    120120        *address = device_keeper_get_free_address(&hcd->dev_manager, speed);
    121121        usb_log_debug("Address request with result: %d.\n", *address);
     
    191191            usb_device_keeper_get_speed(&hcd->dev_manager, address);
    192192        if (speed >= USB_SPEED_MAX) {
     193                // Does this happen?
    193194                speed = ep_speed;
    194195        }
     
    306307        return send_batch(fun, target, USB_DIRECTION_BOTH, data, size,
    307308            setup_data, setup_size, NULL, callback, arg, "Control WRITE");
    308 //      usb_endpoint_manager_reset_if_need(&hc->ep_manager, target, setup_data);
    309309}
    310310/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.