Changeset 1dd264b in mainline


Ignore:
Timestamp:
2010-12-03T13:27:39Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2cb6571
Parents:
4570779 (diff), 62c9661 (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 with vojtechhorky/

Location:
uspace/lib/usb
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/hcdhubd.h

    r4570779 r1dd264b  
    154154 */
    155155
     156device_t *usb_hc_connect(device_t *);
    156157
    157158int usb_hc_async_interrupt_out(usb_hc_device_t *, usb_target_t,
  • uspace/lib/usb/src/localdrv.c

    r4570779 r1dd264b  
    3939#include <errno.h>
    4040
     41/** Find host controller when handled by current task.
     42 *
     43 * @param dev Device asking for connection.
     44 * @return Device structure corresponding to parent host controller.
     45 * @retval NULL Corresponding host controller not found.
     46 */
     47device_t *usb_hc_connect(device_t *dev)
     48{
     49        /*
     50         * FIXME: this will not work when some hub on the path is
     51         * not driven by the same task.
     52         */
     53        device_t *parent = dev;
     54        while (parent->parent != NULL) {
     55                parent = parent->parent;
     56        }
     57       
     58        if (dev == parent) {
     59                printf("FIXME in %s:%d encountered!\n", __FILE__, __LINE__);
     60                parent = NULL;
     61        }
     62
     63        return parent;
     64}
     65
    4166/** Information about pending transaction on HC. */
    4267typedef struct {
  • uspace/lib/usb/src/usbdrv.c

    r4570779 r1dd264b  
    5555/** Connect to host controller the device is physically attached to.
    5656 *
    57  * @param handle Device handle.
     57 * @param dev Device asking for connection.
    5858 * @param flags Connection flags (blocking connection).
    5959 * @return Phone to corresponding HC or error code.
Note: See TracChangeset for help on using the changeset viewer.