Ignore:
Timestamp:
2011-11-10T11:29:10Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
54464f6a, c2245a3, c6f189f7
Parents:
2e1b9dc (diff), 2d1ba51 (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.
Message:

Merge USB changes.

Interface changes:

  • GET_ADDRESS has been renamed to GET_MY_ADDRESS and the handle parameter was dropped. Tis call no longer cascades up to the root hub, but it is answered in the first place the information is available (nearest hub)
  • Reintroduced address reservation for USB_DEFAULT_ADDRESS. The interface now enables device drivers to request specific address on initialization and either insists on that address or accept any other if the address is not available. Note that it is not possible to get the default address if the driver does not insist.
  • Any endpoint registered is removed when address is released and a warning is produced if there were any such endpoints.
  • It is no longer necessary or possible to pass device speed information when registering endpoints.

Driver fixes: memory leaks and crashes (not only) in error paths.
Fixes or removes flaky device_remove implementation in device drivers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/usb_device_manager.h

    r2e1b9dc r747ef72  
    5959                devman_handle_t handle; /**< Devman handle of the device. */
    6060        } devices[USB_ADDRESS_COUNT];
     61        usb_speed_t max_speed;
    6162        fibril_mutex_t guard;
    6263        /** The last reserved address */
     
    6465} usb_device_manager_t;
    6566
    66 void usb_device_manager_init(usb_device_manager_t *instance);
     67void usb_device_manager_init(
     68    usb_device_manager_t *instance, usb_speed_t max_speed);
    6769
    68 usb_address_t usb_device_manager_get_free_address(
    69     usb_device_manager_t *instance, usb_speed_t speed);
     70int usb_device_manager_request_address(usb_device_manager_t *instance,
     71    usb_address_t *address, bool strict, usb_speed_t speed);
    7072
    71 int usb_device_manager_bind(usb_device_manager_t *instance,
     73int usb_device_manager_bind_address(usb_device_manager_t *instance,
    7274    usb_address_t address, devman_handle_t handle);
    7375
    74 int usb_device_manager_release(usb_device_manager_t *instance,
     76int usb_device_manager_release_address(usb_device_manager_t *instance,
    7577    usb_address_t address);
    7678
Note: See TracChangeset for help on using the changeset viewer.