Lines Matching full:rc
52 int rc; in wait_for_complete() local
56 rc = trusty_ipc_poll_for_event(chan->dev); in wait_for_complete()
57 if (rc < 0) in wait_for_complete()
58 return rc; in wait_for_complete()
63 if (rc == TRUSTY_EVENT_NONE && !trusty_ipc_dev_has_event(chan->dev, 0)) in wait_for_complete()
108 int rc; in trusty_ipc_connect() local
115 rc = trusty_ipc_dev_connect(chan->dev, port, (uint64_t)(uintptr_t)chan); in trusty_ipc_connect()
116 if (rc < 0) { in trusty_ipc_connect()
117 trusty_error("%s: init connection failed (%d)\n", __func__, rc); in trusty_ipc_connect()
118 return rc; in trusty_ipc_connect()
120 chan->handle = (handle_t)rc; in trusty_ipc_connect()
125 rc = wait_for_connect(chan); in trusty_ipc_connect()
126 if (rc < 0) { in trusty_ipc_connect()
127 trusty_error("%s: wait for connect failed (%d)\n", __func__, rc); in trusty_ipc_connect()
132 return rc; in trusty_ipc_connect()
136 int rc; in trusty_ipc_close() local
140 rc = trusty_ipc_dev_close(chan->dev, chan->handle); in trusty_ipc_close()
143 return rc; in trusty_ipc_close()
150 int rc; in trusty_ipc_send() local
157 rc = trusty_ipc_dev_send(chan->dev, chan->handle, iovs, iovs_cnt); in trusty_ipc_send()
158 if (rc == TRUSTY_ERR_SEND_BLOCKED) { in trusty_ipc_send()
160 rc = wait_for_send(chan); in trusty_ipc_send()
161 if (rc < 0) { in trusty_ipc_send()
162 trusty_error("%s: wait to send failed (%d)\n", __func__, rc); in trusty_ipc_send()
163 return rc; in trusty_ipc_send()
168 return rc; in trusty_ipc_send()
175 int rc; in trusty_ipc_recv() local
181 rc = wait_for_reply(chan); in trusty_ipc_recv()
182 if (rc < 0) { in trusty_ipc_recv()
183 trusty_error("%s: wait to reply failed (%d)\n", __func__, rc); in trusty_ipc_recv()
184 return rc; in trusty_ipc_recv()
188 rc = trusty_ipc_dev_recv(chan->dev, chan->handle, iovs, iovs_cnt); in trusty_ipc_recv()
189 if (rc < 0) in trusty_ipc_recv()
190 trusty_error("%s: ipc recv failed (%d)\n", __func__, rc); in trusty_ipc_recv()
192 return rc; in trusty_ipc_recv()
196 int rc; in trusty_ipc_poll_for_event() local
202 rc = trusty_ipc_dev_get_event(ipc_dev, 0, &evt); in trusty_ipc_poll_for_event()
203 if (rc) { in trusty_ipc_poll_for_event()
204 trusty_error("%s: get event failed (%d)\n", __func__, rc); in trusty_ipc_poll_for_event()
205 return rc; in trusty_ipc_poll_for_event()
220 rc = chan->ops->on_raw_event(chan, &evt); in trusty_ipc_poll_for_event()
221 if (rc < 0) { in trusty_ipc_poll_for_event()
223 chan->handle, rc); in trusty_ipc_poll_for_event()
224 return rc; in trusty_ipc_poll_for_event()
226 if (rc > 0) in trusty_ipc_poll_for_event()
227 return rc; /* handled */ in trusty_ipc_poll_for_event()
240 rc = chan->ops->on_send_unblocked(chan); in trusty_ipc_poll_for_event()
241 if (rc < 0) { in trusty_ipc_poll_for_event()
243 __func__, chan->handle, rc); in trusty_ipc_poll_for_event()
244 return rc; in trusty_ipc_poll_for_event()
246 if (rc > 0) in trusty_ipc_poll_for_event()
247 return rc; /* handled */ in trusty_ipc_poll_for_event()
254 rc = chan->ops->on_connect_complete(chan); in trusty_ipc_poll_for_event()
255 if (rc < 0) { in trusty_ipc_poll_for_event()
257 chan->handle, rc); in trusty_ipc_poll_for_event()
258 return rc; in trusty_ipc_poll_for_event()
260 if (rc > 0) in trusty_ipc_poll_for_event()
261 return rc; /* handled */ in trusty_ipc_poll_for_event()
268 rc = chan->ops->on_message(chan); in trusty_ipc_poll_for_event()
269 if (rc < 0) { in trusty_ipc_poll_for_event()
271 chan->handle, rc); in trusty_ipc_poll_for_event()
272 return rc; in trusty_ipc_poll_for_event()
274 if (rc > 0) in trusty_ipc_poll_for_event()
275 return rc; in trusty_ipc_poll_for_event()
282 rc = chan->ops->on_disconnect(chan); in trusty_ipc_poll_for_event()
283 if (rc < 0) { in trusty_ipc_poll_for_event()
285 chan->handle, rc); in trusty_ipc_poll_for_event()
286 return rc; in trusty_ipc_poll_for_event()
288 if (rc > 0) in trusty_ipc_poll_for_event()
289 return rc; in trusty_ipc_poll_for_event()