Changeset eb1a2f4 in mainline for uspace/lib/usb/src/pipes.c


Ignore:
Timestamp:
2011-02-22T23:30:56Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3b5d1535, a9c674e0
Parents:
dbe25f1 (diff), 664af708 (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 mainline changes (DDF refactoring)

This merge includes DDF refactoring that brought multifunctional devices
(i.e. ddf_dev_t and ddf_fun_t). Please, see ticket #295 at HelenOS
upstream Trac.

The conflicts themselves were easy to solve (merely several renamings).

Changes to USB subsystem:

  • drivers uses ddf_dev_t and ddf_fun_t
  • different signatures of many library functions
  • several hacks around communication with parent device (now the communication is clearer and somehow what we have now is hack about other hacks)
    • will repair and clean later
  • maybe added some extra debugging messages (the diff has about 240K, and I admit I have no energy to double check that)

WARNING:

  • the diff is VERY long, recommended is viewing partial diffs of the merge (i.e. merges in mainline branch that lead to the parent one)
  • merging with your branches might involve huge renamings, sorry, no other way is possible

BUGS:

  • hub driver will not work (no function created)

GOOD NEWS:

  • QEMU keyboard seems to work with QEMU 0.13 and 0.14
  • we are up-to-date with mainline again
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/pipes.c

    rdbe25f1 reb1a2f4  
    3535#include <usb/usb.h>
    3636#include <usb/pipes.h>
     37#include <usb/debug.h>
    3738#include <usbhc_iface.h>
    3839#include <usb_iface.h>
     40#include <devman.h>
    3941#include <errno.h>
    4042#include <assert.h>
     
    4648 * @return USB address or error code.
    4749 */
    48 static usb_address_t get_my_address(int phone, device_t *dev)
     50static usb_address_t get_my_address(int phone, ddf_dev_t *dev)
    4951{
    5052        sysarg_t address;
     53
     54
     55        /*
     56         * We are sending special value as a handle - zero - to get
     57         * handle of the parent function (that handle was used
     58         * when registering our device @p dev.
     59         */
    5160        int rc = async_req_2_1(phone, DEV_IFACE_ID(USB_DEV_IFACE),
    5261            IPC_M_USB_GET_ADDRESS,
    53             dev->handle, &address);
     62            0, &address);
    5463
    5564        if (rc != EOK) {
     
    6574 * @return Interface number (negative code means any).
    6675 */
    67 int usb_device_get_assigned_interface(device_t *device)
     76int usb_device_get_assigned_interface(ddf_dev_t *device)
    6877{
    6978        int parent_phone = devman_parent_device_connect(device->handle,
     
    94103 */
    95104int usb_device_connection_initialize_from_device(
    96     usb_device_connection_t *connection, device_t *device)
     105    usb_device_connection_t *connection, ddf_dev_t *dev)
    97106{
    98107        assert(connection);
    99         assert(device);
     108        assert(dev);
    100109
    101110        int rc;
     
    103112        usb_address_t my_address;
    104113
    105         rc = usb_hc_find(device->handle, &hc_handle);
     114        rc = usb_hc_find(dev->handle, &hc_handle);
    106115        if (rc != EOK) {
    107116                return rc;
    108117        }
    109118
    110         int parent_phone = devman_parent_device_connect(device->handle,
     119        int parent_phone = devman_parent_device_connect(dev->handle,
    111120            IPC_FLAG_BLOCKING);
    112121        if (parent_phone < 0) {
     
    114123        }
    115124
    116         my_address = get_my_address(parent_phone, device);
     125        my_address = get_my_address(parent_phone, dev);
    117126        if (my_address < 0) {
    118127                rc = my_address;
Note: See TracChangeset for help on using the changeset viewer.