Ignore:
File:
1 edited

Legend:

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

    r4144630 rdac43be  
    113113        usb_hcd_hub_info_t* result = (usb_hcd_hub_info_t*) malloc(sizeof (usb_hcd_hub_info_t));
    114114        //get parent device
     115        /// @TODO this code is not correct
    115116        device_t * my_hcd = device;
    116117        while (my_hcd->parent)
    117118                my_hcd = my_hcd->parent;
    118119        //dev->
    119         printf("[hcdhubd]%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
     120        printf("%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
    120121        //we add the hub into the first hc
    121122        //link_t *link_hc = hc_list.next;
     
    134135 */
    135136int usb_add_hub_device(device_t *dev) {
    136         //usb_hc_device_t *hc = list_get_instance(hc_list.next, usb_hc_device_t, link);
    137         assert(dev->parent);
    138         usb_hc_device_t *hc = (usb_hc_device_t*)dev->parent->driver_data;
    139         usb_address_t addr =usb_use_free_address(hc);
    140         if(addr<0){
    141                 printf("[hcdhubd] ERROR: cannot find an address \n");
    142         }
    143         set_hub_address(hc, addr);
     137        usb_hc_device_t *hc = list_get_instance(hc_list.next, usb_hc_device_t, link);
     138        set_hub_address(hc, 5);
    144139
    145140        check_hub_changes();
     
    156151                my_hcd = my_hcd->parent;
    157152        //dev->
    158         printf("[hcdhubd]%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
     153        printf("%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
    159154        my_hcd = dev;
    160155        while (my_hcd->parent)
     
    162157        //dev->
    163158
    164         printf("[hcdhubd]%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
     159        printf("%s: owner hcd found: %s\n", hc_driver->name, my_hcd->name);
    165160
    166161        //create the hub structure
     
    188183 */
    189184static void set_hub_address(usb_hc_device_t *hc, usb_address_t address) {
    190         printf("[hcdhubd]%s: setting hub address to %d\n", hc->generic->name, address);
     185        printf("%s: setting hub address to %d\n", hc->generic->name, address);
    191186        usb_target_t target = {0, 0};
    192187        usb_handle_t handle;
     
    222217        }
    223218
    224         printf("[hcdhubd]%s: hub address changed successfully to %d\n",
    225                         hc->generic->name, address);
     219        printf("%s: hub address changed\n", hc->generic->name);
    226220}
    227221
Note: See TracChangeset for help on using the changeset viewer.