Changeset 5fd22d8 in mainline for uspace/lib/usb/src/devdrv.c
- Timestamp:
- 2011-03-13T22:47:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91579d5, 92b41f33
- Parents:
- b7d8fd9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/devdrv.c
rb7d8fd9 r5fd22d8 155 155 } 156 156 157 /* Register the endpoints. */ 158 usb_hc_connection_t hc_conn; 159 rc = usb_hc_connection_initialize_from_device(&hc_conn, dev->ddf_dev); 160 if (rc != EOK) { 161 usb_log_error( 162 "Failed initializing connection to host controller: %s.\n", 163 str_error(rc)); 164 goto rollback; 165 } 166 rc = usb_hc_connection_open(&hc_conn); 167 if (rc != EOK) { 168 usb_log_error("Failed to connect to host controller: %s.\n", 169 str_error(rc)); 170 goto rollback; 171 } 172 for (i = 0; i < pipe_count; i++) { 173 if (dev->pipes[i].present) { 174 rc = usb_endpoint_pipe_register(dev->pipes[i].pipe, 175 dev->pipes[i].descriptor->poll_interval, 176 &hc_conn); 177 /* Ignore error when operation not supported by HC. */ 178 if ((rc != EOK) && (rc != ENOTSUP)) { 179 /* FIXME: what shall we do? */ 180 dev->pipes[i].present = false; 181 free(dev->pipes[i].pipe); 182 dev->pipes[i].pipe = NULL; 183 } 184 } 185 } 186 /* Ignoring errors here. */ 187 usb_hc_connection_close(&hc_conn); 188 157 189 return EOK; 158 190
Note:
See TracChangeset
for help on using the changeset viewer.