Changeset cc34f32f in mainline


Ignore:
Timestamp:
2011-02-25T16:48:29Z (14 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dff940f8
Parents:
cd4b184
Message:

speed determination on hub port

File:
1 edited

Legend:

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

    rcd4b184 rcc34f32f  
    350350        dprintf(USB_LOG_LEVEL_DEBUG, "hub info added to list");
    351351
     352        dprintf(USB_LOG_LEVEL_DEBUG, "adding to ddf");
     353        ddf_fun_t *hub_fun = ddf_fun_create(dev, fun_exposed, "hub");
     354        assert(hub_fun != NULL);
     355        hub_fun->ops = NULL;
     356
     357        int rc = ddf_fun_bind(hub_fun);
     358        assert(rc == EOK);
     359        rc = ddf_fun_add_to_class(hub_fun, "hub");
     360        assert(rc == EOK);
     361
    352362        fid_t fid = fibril_create(usb_hub_control_loop, hub_info);
    353363        if (fid == 0) {
     
    421431 */
    422432static void usb_hub_finalize_add_device( usb_hub_info_t * hub,
    423                 uint16_t port) {
     433                uint16_t port, bool isLowSpeed) {
    424434
    425435        int opResult;
     
    444454                        &new_device_connection);
    445455        /// \TODO get highspeed info
     456        usb_speed_t speed = isLowSpeed?USB_SPEED_LOW:USB_SPEED_FULL;
    446457
    447458
     
    449460        usb_address_t new_device_address = usb_hc_request_address(
    450461                        &hub->connection,
    451                         USB_SPEED_LOW/// \TODO fullspeed??
     462                        speed/// \TODO fullspeed??
    452463                        );
    453464        if (new_device_address < 0) {
     
    629640                dprintf(USB_LOG_LEVEL_INFO, "port reset complete");
    630641                if (usb_port_enabled(&status)) {
    631                         usb_hub_finalize_add_device(hub, port);
     642                        usb_hub_finalize_add_device(hub, port, usb_port_low_speed(&status));
    632643                } else {
    633644                        dprintf(USB_LOG_LEVEL_WARNING, "port reset, but port still not enabled");
Note: See TracChangeset for help on using the changeset viewer.