Changeset 50ba203 in mainline for uspace/drv/usbhub


Ignore:
Timestamp:
2011-02-20T15:46:48Z (15 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6bb83c7
Parents:
d81ef61c (diff), 0c00dac (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 with usb/development

Location:
uspace/drv/usbhub
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhub/usbhub.c

    rd81ef61c r50ba203  
    3636#include <bool.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839
    3940#include <usb_iface.h>
    4041#include <usb/usbdrv.h>
    4142#include <usb/descriptor.h>
     43#include <usb/recognise.h>
    4244#include <usb/devreq.h>
    4345#include <usb/request.h>
     
    7678        result->device = device;
    7779
     80<<<<<<< TREE
    7881        result->usb_device = usb_new(usb_hcd_attached_device_info_t);
    7982       
     83=======
     84
     85        dprintf(USB_LOG_LEVEL_DEBUG, "phone to hc = %d", hc);
     86        if (hc < 0) {
     87                return result;
     88        }
     89        //get some hub info
     90        usb_address_t addr = usb_drv_get_my_address(hc, device);
     91        dprintf(USB_LOG_LEVEL_DEBUG, "address of newly created hub = %d", addr);
     92        /*if(addr<0){
     93                //return result;
     94
     95        }*/
     96
     97        result->address = addr;
     98
     99>>>>>>> MERGE-SOURCE
    80100        // get hub descriptor
    81101
     
    148168        int port;
    149169        int opResult;
     170<<<<<<< TREE
    150171        //usb_target_t target;
    151172        //target.address = hub_info->usb_device->address;
    152173        //target.endpoint = 0;
     174=======
     175        usb_target_t target;
     176        target.address = hub_info->address;
     177        target.endpoint = 0;
     178>>>>>>> MERGE-SOURCE
    153179
    154180        //get configuration descriptor
     
    212238        dprintf(USB_LOG_LEVEL_INFO, "hub dev added");
    213239        dprintf(USB_LOG_LEVEL_DEBUG, "\taddress %d, has %d ports ",
    214                         hub_info->usb_device->address,
     240                        hub_info->address,
    215241                        hub_info->port_count);
    216242        dprintf(USB_LOG_LEVEL_DEBUG, "\tused configuration %d",config_descriptor.configuration_number);
     
    317343        }
    318344
     345        devman_handle_t hc_handle;
     346        opResult = usb_drv_find_hc(hub->device, &hc_handle);
     347        if (opResult != EOK) {
     348                usb_log_error("Failed to get handle of host controller: %s.\n",
     349                    str_error(opResult));
     350                return;
     351        }
     352
    319353        devman_handle_t child_handle;
    320         opResult = usb_drv_register_child_in_devman(hc, hub->device,
    321             new_device_address, &child_handle);
     354        opResult = usb_device_register_child_in_devman(new_device_address,
     355            hc_handle, hub->device, &child_handle);
    322356        if (opResult != EOK) {
    323357                dprintf(USB_LOG_LEVEL_ERROR, "could not start driver for new device");
     
    472506                /*
    473507                usb_target_t target;
    474                 target.address = hub_info->usb_device->address;
     508                target.address = hub_info->address;
    475509                target.endpoint = 1;/// \TODO get from endpoint descriptor
    476510                dprintf(USB_LOG_LEVEL_INFO, "checking changes for hub at addr %d",
     
    515549                        if (interrupt) {
    516550                                usb_hub_process_interrupt(
     551<<<<<<< TREE
    517552                                        hub_info, port);
     553=======
     554                                        hub_info, hc, port, hub_info->address);
     555>>>>>>> MERGE-SOURCE
    518556                        }
    519557                }
  • uspace/drv/usbhub/usbhub.h

    rd81ef61c r50ba203  
    3636#define DRV_USBHUB_USBHUB_H
    3737
     38#include <ipc/devman.h>
     39#include <usb/usb.h>
     40#include <driver.h>
     41
    3842#define NAME "usbhub"
    3943
     44<<<<<<< TREE
    4045#include "usb/hcdhubd.h"
    4146
    4247#include <usb/pipes.h>
    4348
     49=======
     50>>>>>>> MERGE-SOURCE
    4451/** basic information about device attached to hub */
    4552typedef struct{
     
    6269        /** attached device handles, for each port one */
    6370        usb_hub_attached_device_t * attached_devs;
    64         /** General usb device info. */
    65         usb_hcd_attached_device_info_t * usb_device;
     71        /** USB address of the hub. */
     72        usb_address_t address;
    6673        /** General device info*/
    6774        device_t * device;
     75<<<<<<< TREE
    6876        /** connection to hcd */
    6977        usb_device_connection_t connection;
     
    7179        usb_hub_endpoints_t endpoints;
    7280
     81=======
     82>>>>>>> MERGE-SOURCE
    7383} usb_hub_info_t;
    7484
Note: See TracChangeset for help on using the changeset viewer.