Changeset d93f5afb in mainline for uspace/drv/bus/usb/usbhub/usbhub.c
- Timestamp:
- 2013-08-02T15:59:51Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dcbda00
- Parents:
- 3969a42
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/usbhub.c
r3969a42 rd93f5afb 111 111 fibril_condvar_initialize(&hub_dev->pending_ops_cv); 112 112 113 usb_pipe_t *control_pipe = usb_device_get_default_pipe(usb_dev);114 115 int opResult = usb_pipe_start_long_transfer(control_pipe);116 if (opResult != EOK) {117 usb_log_error("Failed to start long ctrl pipe transfer: %s\n",118 str_error(opResult));119 return opResult;120 }121 122 113 /* Set hub's first configuration. (There should be only one) */ 123 opResult = usb_set_first_configuration(usb_dev); 124 if (opResult != EOK) { 125 usb_pipe_end_long_transfer(control_pipe); 114 int opResult = usb_set_first_configuration(usb_dev); 115 if (opResult != EOK) { 126 116 usb_log_error("Could not set hub configuration: %s\n", 127 117 str_error(opResult)); … … 132 122 opResult = usb_hub_process_hub_specific_info(hub_dev); 133 123 if (opResult != EOK) { 134 usb_pipe_end_long_transfer(control_pipe);135 124 usb_log_error("Could process hub specific info, %s\n", 136 125 str_error(opResult)); … … 143 132 fun_exposed, HUB_FNC_NAME); 144 133 if (hub_dev->hub_fun == NULL) { 145 usb_pipe_end_long_transfer(control_pipe);146 134 usb_log_error("Failed to create hub function.\n"); 147 135 return ENOMEM; … … 151 139 opResult = ddf_fun_bind(hub_dev->hub_fun); 152 140 if (opResult != EOK) { 153 usb_pipe_end_long_transfer(control_pipe);154 141 usb_log_error("Failed to bind hub function: %s.\n", 155 142 str_error(opResult)); … … 164 151 -1, usb_hub_polling_terminated_callback, hub_dev); 165 152 if (opResult != EOK) { 166 usb_pipe_end_long_transfer(control_pipe);167 153 /* Function is already bound */ 168 154 ddf_fun_unbind(hub_dev->hub_fun); … … 176 162 usb_device_get_name(hub_dev->usb_device), hub_dev->port_count); 177 163 178 usb_pipe_end_long_transfer(control_pipe);179 164 return EOK; 180 165 }
Note:
See TracChangeset
for help on using the changeset viewer.