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


Ignore:
Timestamp:
2011-03-16T18:50:17Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
42a3a57
Parents:
3e7b7cd (diff), fcf07e6 (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 from usb/development

File:
1 edited

Legend:

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

    r3e7b7cd r72af8da  
    5757 *
    5858 * @param connection Opened connection to host controller.
     59 * @param speed Speed of the device that will respond on the default address.
    5960 * @return Error code.
    6061 */
     
    8687 *
    8788 * @param connection Opened connection to host controller.
     89 * @param speed Speed of the new device (device that will be assigned
     90 *    the returned address).
    8891 * @return Assigned USB address or negative error code.
    8992 */
     
    144147/** Wrapper for registering attached device to the hub.
    145148 *
    146  * The @p enable_port function is expected to enable singalling on given
     149 * The @p enable_port function is expected to enable signaling on given
    147150 * port.
    148151 * The two arguments to it can have arbitrary meaning
     
    152155 *
    153156 * If the @p enable_port fails (i.e. does not return EOK), the device
    154  * addition is cancelled.
     157 * addition is canceled.
    155158 * The return value is then returned (it is good idea to use different
    156159 * error codes than those listed as return codes by this function itself).
    157160 *
    158  * @param parent Parent device (i.e. the hub device).
    159  * @param connection Opened connection to host controller.
    160  * @param dev_speed New device speed.
    161  * @param enable_port Function for enabling signalling through the port the
     161 * @param[in] parent Parent device (i.e. the hub device).
     162 * @param[in] connection Opened connection to host controller.
     163 * @param[in] dev_speed New device speed.
     164 * @param[in] enable_port Function for enabling signaling through the port the
    162165 *      device is attached to.
    163  * @param port_no Port number (passed through to @p enable_port).
    164  * @param arg Any data argument to @p enable_port.
     166 * @param[in] port_no Port number (passed through to @p enable_port).
     167 * @param[in] arg Any data argument to @p enable_port.
    165168 * @param[out] assigned_address USB address of the device.
    166169 * @param[out] assigned_handle Devman handle of the new device.
     170 * @param[in] dev_ops Child device ops.
     171 * @param[in] new_dev_data Arbitrary pointer to be stored in the child
     172 *      as @c driver_data.
     173 * @param[out] new_fun Storage where pointer to allocated child function
     174 *      will be written.
    167175 * @return Error code.
    168176 * @retval ENOENT Connection to HC not opened.
     
    201209
    202210        /*
    203          * Enable the port (i.e. allow signalling through this port).
     211         * Enable the port (i.e. allow signaling through this port).
    204212         */
    205213        rc = enable_port(port_no, arg);
     
    223231        rc = usb_endpoint_pipe_initialize_default_control(&ctrl_pipe,
    224232            &dev_conn);
     233        if (rc != EOK) {
     234                rc = ENOTCONN;
     235                goto leave_release_default_address;
     236        }
     237        rc = usb_endpoint_pipe_probe_default_control(&ctrl_pipe);
    225238        if (rc != EOK) {
    226239                rc = ENOTCONN;
Note: See TracChangeset for help on using the changeset viewer.