Changes in uspace/lib/usb/src/pipesio.c [2c2cbcf:77223f8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipesio.c
r2c2cbcf r77223f8 49 49 #include <assert.h> 50 50 #include <usbhc_iface.h> 51 #include <usb/request.h>52 51 #include "pipepriv.h" 53 52 … … 173 172 174 173 int rc; 175 rc = pipe_add_ref(pipe , false);174 rc = pipe_add_ref(pipe); 176 175 if (rc != EOK) { 177 176 return rc; … … 296 295 int rc; 297 296 298 rc = pipe_add_ref(pipe , false);297 rc = pipe_add_ref(pipe); 299 298 if (rc != EOK) { 300 299 return rc; … … 306 305 307 306 return rc; 308 }309 310 /** Try to clear endpoint halt of default control pipe.311 *312 * @param pipe Pipe for control endpoint zero.313 */314 static void clear_self_endpoint_halt(usb_pipe_t *pipe)315 {316 assert(pipe != NULL);317 318 if (!pipe->auto_reset_halt || (pipe->endpoint_no != 0)) {319 return;320 }321 322 323 /* Prevent indefinite recursion. */324 pipe->auto_reset_halt = false;325 usb_request_clear_endpoint_halt(pipe, 0);326 pipe->auto_reset_halt = true;327 307 } 328 308 … … 447 427 int rc; 448 428 449 rc = pipe_add_ref(pipe , false);429 rc = pipe_add_ref(pipe); 450 430 if (rc != EOK) { 451 431 return rc; … … 456 436 setup_buffer, setup_buffer_size, 457 437 data_buffer, data_buffer_size, &act_size); 458 459 if (rc == ESTALL) {460 clear_self_endpoint_halt(pipe);461 }462 438 463 439 pipe_drop_ref(pipe); … … 579 555 int rc; 580 556 581 rc = pipe_add_ref(pipe , false);557 rc = pipe_add_ref(pipe); 582 558 if (rc != EOK) { 583 559 return rc; … … 587 563 setup_buffer, setup_buffer_size, data_buffer, data_buffer_size); 588 564 589 if (rc == ESTALL) {590 clear_self_endpoint_halt(pipe);591 }592 593 565 pipe_drop_ref(pipe); 594 566
Note:
See TracChangeset
for help on using the changeset viewer.