Changeset edc4c66 in mainline for uspace/lib/usb/src/hub.c


Ignore:
Timestamp:
2011-04-10T08:16:04Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
86b4ee0
Parents:
a19a2d7 (diff), d824daf (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:

Development branch changes

File:
1 edited

Legend:

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

    ra19a2d7 redc4c66  
    4242#include <usb/debug.h>
    4343
     44/** How much time to wait between attempts to register endpoint 0:0.
     45 * The value is based on typical value for port reset + some overhead.
     46 */
     47#define ENDPOINT_0_0_REGISTER_ATTEMPT_DELAY_USEC (1000 * (10 + 2))
     48
    4449/** Check that HC connection is alright.
    4550 *
     
    5358                } \
    5459        } while (false)
    55 
    56 
    57 /** Tell host controller to reserve default address.
    58  * @deprecated
    59  *
    60  * @param connection Opened connection to host controller.
    61  * @param speed Speed of the device that will respond on the default address.
    62  * @return Error code.
    63  */
    64 int usb_hc_reserve_default_address(usb_hc_connection_t *connection,
    65     usb_speed_t speed)
    66 {
    67         CHECK_CONNECTION(connection);
    68 
    69         usb_log_warning("usb_hc_reserve_default_address() considered obsolete");
    70 
    71         return async_req_2_0(connection->hc_phone,
    72             DEV_IFACE_ID(USBHC_DEV_IFACE),
    73             IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS, speed);
    74 }
    75 
    76 /** Tell host controller to release default address.
    77  * @deprecated
    78  *
    79  * @param connection Opened connection to host controller.
    80  * @return Error code.
    81  */
    82 int usb_hc_release_default_address(usb_hc_connection_t *connection)
    83 {
    84         CHECK_CONNECTION(connection);
    85 
    86         usb_log_warning("usb_hc_release_default_address() considered obsolete");
    87 
    88         return async_req_1_0(connection->hc_phone,
    89             DEV_IFACE_ID(USBHC_DEV_IFACE),
    90             IPC_M_USBHC_RELEASE_DEFAULT_ADDRESS);
    91 }
    9260
    9361/** Ask host controller for free address assignment.
     
    269237                if (rc != EOK) {
    270238                        /* Do not overheat the CPU ;-). */
    271                         async_usleep(10);
     239                        async_usleep(ENDPOINT_0_0_REGISTER_ATTEMPT_DELAY_USEC);
    272240                }
    273241        } while (rc != EOK);
Note: See TracChangeset for help on using the changeset viewer.