Changes in uspace/lib/usb/src/pipepriv.c [2c2cbcf:d48fcc0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipepriv.c
r2c2cbcf rd48fcc0 77 77 * 78 78 * @param pipe The USB pipe. 79 * @param hide_failure Whether to hide failure when adding reference80 * (use soft refcount).81 79 * @return Error code. 82 80 * @retval EOK Currently always. 83 81 */ 84 int pipe_add_ref(usb_pipe_t *pipe , bool hide_failure)82 int pipe_add_ref(usb_pipe_t *pipe) 85 83 { 84 another_try: 86 85 pipe_acquire(pipe); 87 86 … … 90 89 int phone = devman_device_connect(pipe->wire->hc_handle, 0); 91 90 if (phone < 0) { 92 if (hide_failure) { 93 pipe->refcount_soft++; 94 phone = EOK; 95 } 91 // TODO: treat some error as non-recoverable 92 // and return error from here 96 93 pipe_release(pipe); 97 return phone;94 goto another_try; 98 95 } 99 96 /* … … 117 114 { 118 115 pipe_acquire(pipe); 119 if (pipe->refcount_soft > 0) {120 pipe->refcount_soft--;121 pipe_release(pipe);122 return;123 }124 116 assert(pipe->refcount > 0); 125 117 pipe->refcount--;
Note:
See TracChangeset
for help on using the changeset viewer.