Changes in uspace/drv/ohci/ohci.c [5d07f54:561112f] in mainline


Ignore:
File:
1 edited

Legend:

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

    r5d07f54 r561112f  
    5454{
    5555        assert(dev);
    56         assert(dev->driver_data);
    5756        hc_t *hc = &((ohci_t*)dev->driver_data)->hc;
    5857        uint16_t status = IPC_GET_ARG1(*call);
     
    153152        usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
    154153            (void *) mem_reg_base, mem_reg_size, irq);
     154
     155        ret = pci_disable_legacy(device);
     156        CHECK_RET_DEST_FUN_RETURN(ret,
     157            "Failed(%d) to disable legacy USB: %s.\n", ret, str_error(ret));
    155158
    156159        bool interrupts = false;
     
    209212            "Failed(%d) to create root hub function.\n", ret);
    210213
     214        hc_register_hub(&instance->hc, instance->rh_fun);
    211215
    212216        instance->rh_fun->ops = &rh_ops;
    213217        instance->rh_fun->driver_data = NULL;
    214        
    215         device->driver_data = instance;
    216 
    217         hc_start_hw(&instance->hc);
     218        ret = ddf_fun_bind(instance->rh_fun);
     219        CHECK_RET_FINI_RETURN(ret,
     220            "Failed(%d) to register OHCI root hub.\n", ret);
     221
    218222        return EOK;
    219223#undef CHECK_RET_FINI_RETURN
Note: See TracChangeset for help on using the changeset viewer.