Changeset 0f1586d0 in mainline
- Timestamp:
- 2011-09-02T20:25:02Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 52eead3e
- Parents:
- 5f57929
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r5f57929 r0f1586d0 139 139 &instance->generic.dev_manager, hub_address, hub_fun->handle); 140 140 141 #define CHECK_RET_ DESTROY(ret, message...) \141 #define CHECK_RET_RETURN(ret, message...) \ 142 142 if (ret != EOK) { \ 143 143 usb_log_error(message); \ 144 endpoint_destroy(ep); \145 usb_endpoint_manager_unregister_ep(&instance->generic.ep_manager, \146 hub_address, 0, USB_DIRECTION_BOTH); \147 144 return ret; \ 148 145 } else (void)0 149 endpoint_t *ep = 150 endpoint_get(hub_address, 0, USB_DIRECTION_BOTH, 151 USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64); 152 if (ep == NULL) 153 return ENOMEM; 154 155 int ret = ohci_endpoint_init(&instance->generic, ep); 156 CHECK_RET_DESTROY(ret, "Failed to initialize rh OHCI ep structures.\n"); 157 158 ret = usb_endpoint_manager_register_ep( 159 &instance->generic.ep_manager, ep, 0); 160 CHECK_RET_DESTROY(ret, "Failed to initialize rh control ep.\n"); 161 ep = NULL; 146 int ret = usb_endpoint_manager_add_ep( 147 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH, 148 USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0); 149 CHECK_RET_RETURN(ret, 150 "Failed to register root hub control endpoint: %s.\n", 151 str_error(ret)); 162 152 163 153 ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100); 164 CHECK_RET_ DESTROY(ret,154 CHECK_RET_RETURN(ret, 165 155 "Failed to add root hub match-id: %s.\n", str_error(ret)); 166 156 167 157 ret = ddf_fun_bind(hub_fun); 168 CHECK_RET_ DESTROY(ret,158 CHECK_RET_RETURN(ret, 169 159 "Failed to bind root hub function: %s.\n", str_error(ret)); 170 160
Note:
See TracChangeset
for help on using the changeset viewer.