Changeset 4ede178 in mainline
- Timestamp:
- 2011-04-09T15:58:25Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8efafda
- Parents:
- e9ce696
- Location:
- uspace/lib/usb/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/devdrv.c
re9ce696 r4ede178 239 239 240 240 /* 241 * For further actions, we need open session on default control pipe. 241 * We will do some querying of the device, it is worth to prepare 242 * the long transfer. 242 243 */ 243 rc = usb_pipe_start_ session(&dev->ctrl_pipe);244 if (rc != EOK) { 245 usb_log_error("Failed to start an IPC session: %s.\n",244 rc = usb_pipe_start_long_transfer(&dev->ctrl_pipe); 245 if (rc != EOK) { 246 usb_log_error("Failed to start transfer: %s.\n", 246 247 str_error(rc)); 247 248 return rc; … … 252 253 &dev->descriptors.device); 253 254 if (rc != EOK) { 255 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 254 256 usb_log_error("Failed to retrieve device descriptor: %s.\n", 255 257 str_error(rc)); … … 262 264 &dev->descriptors.configuration_size); 263 265 if (rc != EOK) { 266 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 264 267 usb_log_error("Failed retrieving configuration descriptor: %s. %s\n", 265 268 dev->ddf_dev->name, str_error(rc)); … … 271 274 } 272 275 273 /* No checking here. */ 274 usb_pipe_end_session(&dev->ctrl_pipe); 276 usb_pipe_end_long_transfer(&dev->ctrl_pipe); 275 277 276 278 /* Rollback actions. */ -
uspace/lib/usb/src/devpoll.c
re9ce696 r4ede178 77 77 int rc; 78 78 79 rc = usb_pipe_start_session(pipe);80 if (rc != EOK) {81 failed_attempts++;82 continue;83 }84 85 79 size_t actual_size; 86 80 rc = usb_pipe_read(pipe, polling_data->buffer, 87 81 polling_data->request_size, &actual_size); 88 82 89 /* Quit the session regardless of errors. */90 usb_pipe_end_session(pipe);91 83 92 84 // if (rc == ESTALL) { -
uspace/lib/usb/src/hub.c
re9ce696 r4ede178 287 287 } 288 288 289 rc = usb_pipe_start_session(&ctrl_pipe);290 if (rc != EOK) {291 rc = ENOTCONN;292 goto leave_unregister_endpoint;293 }294 295 289 rc = usb_request_set_address(&ctrl_pipe, dev_addr); 296 290 if (rc != EOK) { … … 298 292 goto leave_stop_session; 299 293 } 300 301 usb_pipe_end_session(&ctrl_pipe);302 294 303 295 /* -
uspace/lib/usb/src/pipesinit.c
re9ce696 r4ede178 416 416 int rc; 417 417 418 TRY_LOOP(failed_attempts) { 419 rc = usb_pipe_start_session(pipe); 420 if (rc == EOK) { 421 break; 422 } 423 } 418 rc = usb_pipe_start_long_transfer(pipe); 424 419 if (rc != EOK) { 425 420 return rc; … … 442 437 } 443 438 } 444 usb_pipe_end_ session(pipe);439 usb_pipe_end_long_transfer(pipe); 445 440 if (rc != EOK) { 446 441 return rc; -
uspace/lib/usb/src/recognise.c
re9ce696 r4ede178 404 404 child->driver_data = dev_data; 405 405 406 rc = usb_pipe_start_session(&ctrl_pipe);407 if (rc != EOK) {408 goto failure;409 }410 411 406 rc = usb_device_create_match_ids(&ctrl_pipe, &child->match_ids); 412 if (rc != EOK) {413 goto failure;414 }415 416 rc = usb_pipe_end_session(&ctrl_pipe);417 407 if (rc != EOK) { 418 408 goto failure;
Note:
See TracChangeset
for help on using the changeset viewer.