Changeset 4d62aa0 in mainline
- Timestamp:
- 2011-07-10T23:03:54Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1ef93fa
- Parents:
- 78ab6d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci.c
r78ab6d4 r4d62aa0 167 167 } \ 168 168 free(instance); \ 169 device->driver_data = NULL; \ 169 170 usb_log_error(message); \ 170 171 return ret; \ … … 174 175 instance->hc_fun = ddf_fun_create(device, fun_exposed, "ohci_hc"); 175 176 int ret = instance->hc_fun ? EOK : ENOMEM; 176 CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create OHCI HC function.\n"); 177 CHECK_RET_DEST_FREE_RETURN(ret, 178 "Failed to create OHCI HC function: %s.\n", str_error(ret)); 177 179 instance->hc_fun->ops = &hc_ops; 178 180 instance->hc_fun->driver_data = &instance->hc; … … 180 182 instance->rh_fun = ddf_fun_create(device, fun_inner, "ohci_rh"); 181 183 ret = instance->rh_fun ? EOK : ENOMEM; 182 CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create OHCI RH function.\n"); 184 CHECK_RET_DEST_FREE_RETURN(ret, 185 "Failed to create OHCI RH function: %s.\n", str_error(ret)); 183 186 instance->rh_fun->ops = &rh_ops; 184 187 … … 207 210 &irq_code); 208 211 CHECK_RET_DEST_FREE_RETURN(ret, 209 "Failed (%d) to register interrupt handler.\n", ret);212 "Failed to register interrupt handler: %s.\n", str_error(ret)); 210 213 211 214 /* Try to enable interrupts */ … … 214 217 if (ret != EOK) { 215 218 usb_log_warning("Failed to enable interrupts: %s." 216 "Falling back to poll ling\n", str_error(ret));219 "Falling back to polling\n", str_error(ret)); 217 220 /* We don't need that handler */ 218 221 unregister_interrupt_handler(device, irq); … … 223 226 224 227 ret = hc_init(&instance->hc, reg_base, reg_size, interrupts); 225 CHECK_RET_DEST_FREE_RETURN(ret, "Failed(%d) to init ohci_hcd.\n", ret); 228 CHECK_RET_DEST_FREE_RETURN(ret, 229 "Failed to init ohci_hcd: %s.\n", str_error(ret)); 230 231 device->driver_data = instance; 226 232 227 233 #define CHECK_RET_FINI_RETURN(ret, message...) \ … … 235 241 ret = ddf_fun_bind(instance->hc_fun); 236 242 CHECK_RET_FINI_RETURN(ret, 237 "Failed(%d) to bind OHCI device function: %s.\n", 238 ret, str_error(ret)); 243 "Failed to bind OHCI device function: %s.\n", str_error(ret)); 239 244 240 245 ret = ddf_fun_add_to_class(instance->hc_fun, USB_HC_DDF_CLASS_NAME); … … 242 247 "Failed to add OHCI to HC class: %s.\n", str_error(ret)); 243 248 244 device->driver_data = instance;245 246 249 hc_start_hw(&instance->hc); 247 250 hc_register_hub(&instance->hc, instance->rh_fun);
Note:
See TracChangeset
for help on using the changeset viewer.