Changeset eb1a2f4 in mainline for uspace/drv/usbhub/usbhub.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/drv/usbhub/usbhub.c

    rdbe25f1 reb1a2f4  
    3333 */
    3434
    35 #include <driver.h>
     35#include <ddf/driver.h>
    3636#include <bool.h>
    3737#include <errno.h>
     
    5252#include "usb/classes/classes.h"
    5353
    54 static device_ops_t hub_device_ops = {
     54static ddf_dev_ops_t hub_device_ops = {
    5555        .interfaces[USB_DEV_IFACE] = &usb_iface_hub_impl
    5656};
     
    7979 */
    8080static int usb_hub_init_communication(usb_hub_info_t * hub){
     81        usb_log_debug("Initializing hub USB communication (hub->device->handle=%zu).\n", hub->device->handle);
    8182        int opResult;
    8283        opResult = usb_device_connection_initialize_from_device(
     
    8889                return opResult;
    8990        }
     91        usb_log_debug("Initializing USB wire abstraction.\n");
    9092        opResult = usb_hc_connection_initialize_from_device(&hub->connection,
    9193                        hub->device);
     
    9597                return opResult;
    9698        }
     99        usb_log_debug("Initializing default control pipe.\n");
    97100        opResult = usb_endpoint_pipe_initialize_default_control(&hub->endpoints.control,
    98101            &hub->device_connection);
     
    222225 * @return pointer to created structure or NULL in case of error
    223226 */
    224 usb_hub_info_t * usb_create_hub_info(device_t * device) {
     227usb_hub_info_t * usb_create_hub_info(ddf_dev_t * device) {
    225228        usb_hub_info_t* result = usb_new(usb_hub_info_t);
    226229        result->device = device;
     
    291294 * @return
    292295 */
    293 int usb_add_hub_device(device_t *dev) {
     296int usb_add_hub_device(ddf_dev_t *dev) {
    294297        dprintf(USB_LOG_LEVEL_INFO, "add_hub_device(handle=%d)", (int) dev->handle);
    295298
    296         dev->ops = &hub_device_ops;
     299        //dev->ops = &hub_device_ops;
     300        (void) hub_device_ops;
    297301
    298302        usb_hub_info_t * hub_info = usb_create_hub_info(dev);
     
    450454        //??
    451455    opResult = usb_device_register_child_in_devman(new_device_address,
    452             hub->connection.hc_handle, hub->device, &child_handle);
     456            hub->connection.hc_handle, hub->device, &child_handle,
     457            NULL, NULL, NULL);
    453458
    454459        if (opResult != EOK) {
Note: See TracChangeset for help on using the changeset viewer.