Changes in uspace/lib/usb/src/pipesio.c [77223f8:2c2cbcf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipesio.c
r77223f8 r2c2cbcf 49 49 #include <assert.h> 50 50 #include <usbhc_iface.h> 51 #include <usb/request.h> 51 52 #include "pipepriv.h" 52 53 … … 172 173 173 174 int rc; 174 rc = pipe_add_ref(pipe );175 rc = pipe_add_ref(pipe, false); 175 176 if (rc != EOK) { 176 177 return rc; … … 295 296 int rc; 296 297 297 rc = pipe_add_ref(pipe );298 rc = pipe_add_ref(pipe, false); 298 299 if (rc != EOK) { 299 300 return rc; … … 305 306 306 307 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; 307 327 } 308 328 … … 427 447 int rc; 428 448 429 rc = pipe_add_ref(pipe );449 rc = pipe_add_ref(pipe, false); 430 450 if (rc != EOK) { 431 451 return rc; … … 436 456 setup_buffer, setup_buffer_size, 437 457 data_buffer, data_buffer_size, &act_size); 458 459 if (rc == ESTALL) { 460 clear_self_endpoint_halt(pipe); 461 } 438 462 439 463 pipe_drop_ref(pipe); … … 555 579 int rc; 556 580 557 rc = pipe_add_ref(pipe );581 rc = pipe_add_ref(pipe, false); 558 582 if (rc != EOK) { 559 583 return rc; … … 563 587 setup_buffer, setup_buffer_size, data_buffer, data_buffer_size); 564 588 589 if (rc == ESTALL) { 590 clear_self_endpoint_halt(pipe); 591 } 592 565 593 pipe_drop_ref(pipe); 566 594
Note:
See TracChangeset
for help on using the changeset viewer.