Changeset cc34f5f0 in mainline for uspace/drv/bus/usb/ohci/hc.c


Ignore:
Timestamp:
2011-08-25T15:15:17Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
09ace19
Parents:
961c29e8
Message:

ohci: Fix new arch paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hc.c

    r961c29e8 rcc34f5f0  
    6565{
    6666        assert(hcd);
     67        batch_init_ohci(batch);
    6768        return hc_schedule(hcd->private_data, batch);
    6869}
     
    147148if (ret != EOK) { \
    148149        usb_log_error(message); \
    149         hc_remove_endpoint(instance, hub_address, 0, USB_DIRECTION_BOTH); \
    150         usb_device_keeper_release(&instance->manager, hub_address); \
    151150        return ret; \
    152151} else (void)0
    153 
    154         int ret = hc_add_endpoint(instance, hub_address, 0, USB_SPEED_FULL,
    155             USB_TRANSFER_CONTROL, USB_DIRECTION_BOTH, 64, 0, 0);
    156         CHECK_RET_RELEASE(ret,
    157             "Failed to add OHCI root hub endpoint 0: %s.\n", str_error(ret));
     152        endpoint_t *ep =
     153            endpoint_get(hub_address, 0, USB_DIRECTION_BOTH,
     154            USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64);
     155        if (ep == NULL)
     156                return ENOMEM;
     157
     158        int ret = ohci_endpoint_init(&instance->generic, ep);
     159        if (ret != EOK) {
     160                endpoint_destroy(ep);
     161                return ret;
     162        }
     163
     164        ret = usb_endpoint_manager_register_ep(&instance->generic.ep_manager, ep, 0);
     165        if (ret != EOK) {
     166                endpoint_destroy(ep);
     167                return ret;
     168        }
     169        hc_enqueue_endpoint(instance, ep);
     170
     171
     172//      int ret = hc_add_endpoint(instance, hub_address, 0, USB_SPEED_FULL,
     173//          USB_TRANSFER_CONTROL, USB_DIRECTION_BOTH, 64, 0, 0);
     174//      CHECK_RET_RELEASE(ret,
     175//          "Failed to add OHCI root hub endpoint 0: %s.\n", str_error(ret));
    158176
    159177        ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100);
     
    201219
    202220        ret = hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11);
    203         CHECK_RET_RETURN(ret, "Failed to initialize endpoint manager: %s.\n",
     221        CHECK_RET_RETURN(ret, "Failed to initialize generic driver: %s.\n",
    204222            str_error(ret));
    205223        instance->generic.private_data = instance;
Note: See TracChangeset for help on using the changeset viewer.