Ignore:
Timestamp:
2011-12-23T18:13:33Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3819ce5, b39eb79, f0b74b2
Parents:
2f0dd2a (diff), 153cc76a (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:

USB branch changes.

+ USB device drivers use single async session to host controller, this session (represented by usb_hc_connection_t) is used for both HC requests and to back usb device connection.
+ Pipe locking was removed. Reference counting was moved to usb_hc_connection_t. Every read/write operation uses separate parallel exchange thus any contention is resolved on hc side.

  • async_sess_t setup using EXCHANGE_PARALLEL uses one extra phone (session phone, each exch creates its own), thus the number of phones used by usb dvice driver might increase. Possible solutions are: make read/write calls atomic (all other calls are atomic) and use EXCHANGE_ATOMIC, any other solution provided by changes to async_sess_t.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r2f0dd2a r7e1b130  
    3636#define LIBUSBDEV_DRIVER_H_
    3737
     38#include <usb/hc.h>
     39#include <usb/dev/usb_device_connection.h>
    3840#include <usb/dev/pipes.h>
    3941
     
    7274/** USB device structure. */
    7375typedef struct {
     76        /** Connection to USB hc, used by wire and arbitrary requests. */
     77        usb_hc_connection_t hc_conn;
    7478        /** Connection backing the pipes.
    7579         * Typically, you will not need to use this attribute at all.
     
    169173void usb_device_release_descriptors(usb_device_descriptors_t *);
    170174
    171 int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *,
     175int usb_device_create_pipes(usb_device_connection_t *,
    172176    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
    173177    usb_endpoint_mapping_t **, size_t *);
    174 int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
     178void usb_device_destroy_pipes(usb_endpoint_mapping_t *, size_t);
    175179
    176180void * usb_device_data_alloc(usb_device_t *, size_t);
Note: See TracChangeset for help on using the changeset viewer.