Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes in / [4144630:2cb6571] in mainline


Ignore:
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    r4144630 r2cb6571  
    4545/** Maximum active async calls per thread */
    4646#ifdef CONFIG_DEBUG
    47         #define IPC_MAX_ASYNC_CALLS  4
     47        #define IPC_MAX_ASYNC_CALLS  16
    4848#else
    4949        #define IPC_MAX_ASYNC_CALLS  4000
  • uspace/drv/uhci/main.c

    r4144630 r2cb6571  
    7777        /*
    7878         * We need to announce the presence of our root hub.
    79          * Commented out until the problem which causes the whole task to
    80          * block is solved.
    8179         */
    82         //usb_hcd_add_root_hub(device);
     80        usb_hcd_add_root_hub(device);
    8381
    8482        return EOK;
  • uspace/lib/usb/include/usb/hcdhubd.h

    r4144630 r2cb6571  
    191191 */
    192192
     193device_t *usb_hc_connect(device_t *);
    193194
    194195int usb_hc_async_interrupt_out(usb_hc_device_t *, usb_target_t,
  • uspace/lib/usb/src/hcdhubd.c

    r4144630 r2cb6571  
    107107int usb_hcd_add_root_hub(usb_hc_device_t *dev) {
    108108        char *id;
    109         int rc = asprintf(&id, "usb&hc=%s&hub", dev->generic->name);
     109        int rc = asprintf(&id, "usb&hc=%s&hub", hc_driver->name);
    110110        if (rc <= 0) {
    111111                return rc;
     
    133133        int rc;
    134134
     135        async_usleep(1000);
     136
    135137        device_t *child = create_device();
    136138        match_id_t *match_id = NULL;
     
    196198        printf("%s: about to add child device `%s' (%s)\n", hc_driver->name,
    197199                        name, match_id);
     200
     201        /*
     202         * Seems that creating fibril which postpones the action
     203         * is the best solution.
     204         */
     205        create_fibril = true;
    198206
    199207        struct child_device_info *child_info
  • uspace/lib/usb/src/localdrv.c

    r4144630 r2cb6571  
    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

    r4144630 r2cb6571  
    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.