Changeset 5ec492b in mainline
- Timestamp:
- 2011-09-07T14:09:07Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ffe3fe1
- Parents:
- d394f1b8
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
rd394f1b8 r5ec492b 139 139 &instance->generic.dev_manager, hub_address, hub_fun->handle); 140 140 141 #define CHECK_RET_ RETURN(ret, message...) \141 #define CHECK_RET_UNREG_RETURN(ret, message...) \ 142 142 if (ret != EOK) { \ 143 143 usb_log_error(message); \ 144 usb_endpoint_manager_unregister_ep( \ 145 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH);\ 146 usb_device_keeper_release( \ 147 &instance->generic.dev_manager, hub_address); \ 144 148 return ret; \ 145 149 } else (void)0 … … 147 151 &instance->generic.ep_manager, hub_address, 0, USB_DIRECTION_BOTH, 148 152 USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64, 0); 149 CHECK_RET_ RETURN(ret,153 CHECK_RET_UNREG_RETURN(ret, 150 154 "Failed to register root hub control endpoint: %s.\n", 151 155 str_error(ret)); 152 156 153 157 ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100); 154 CHECK_RET_ RETURN(ret,158 CHECK_RET_UNREG_RETURN(ret, 155 159 "Failed to add root hub match-id: %s.\n", str_error(ret)); 156 160 157 161 ret = ddf_fun_bind(hub_fun); 158 CHECK_RET_ RETURN(ret,162 CHECK_RET_UNREG_RETURN(ret, 159 163 "Failed to bind root hub function: %s.\n", str_error(ret)); 160 164 -
uspace/drv/bus/usb/ohci/ohci.c
rd394f1b8 r5ec492b 231 231 #define CHECK_RET_FINI_RETURN(ret, message...) \ 232 232 if (ret != EOK) { \ 233 hc_fini(&instance->hc); \ 233 234 unregister_interrupt_handler(device, irq); \ 234 hc_fini(&instance->hc); \235 235 CHECK_RET_DEST_FREE_RETURN(ret, message); \ 236 236 } else (void)0 … … 245 245 "Failed to add OHCI to HC class: %s.\n", str_error(ret)); 246 246 247 hc_register_hub(&instance->hc, instance->rh_fun); 248 return EOK; 247 ret = hc_register_hub(&instance->hc, instance->rh_fun); 248 CHECK_RET_FINI_RETURN(ret, 249 "Failed to register OHCI root hub: %s.\n", str_error(ret)); 250 return ret; 249 251 250 252 #undef CHECK_RET_FINI_RETURN
Note:
See TracChangeset
for help on using the changeset viewer.