mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-18 19:12:56 +00:00
GLINK operates using pre-allocated buffers, aka intents, where incoming messages are aggregated before being passed up the stack. In the case that no suitable intents have been announced by the receiver, the sender can request an intent to be allocated. The initial implementation of the response to such request dealt with two outcomes; granted allocations, and all other cases being considered -ECANCELLED (likely from "cancelling the operation as the remote is going down"). But on some channels intent allocation is not supported, instead the remote will pre-allocate and announce a fixed number of intents for the sender to use. If for such channels an rpmsg_send() is being invoked before any channels have been announced, an intent request will be issued and as this comes back rejected the call fails with -ECANCELED. Given that this is reported in the same way as the remote being shut down, there's no way for the client to differentiate the two cases. In line with the original GLINK design, change the return value to -EAGAIN for the case where the remote rejects an intent allocation request. It's tempting to handle this case in the GLINK core, as we expect intents to show up in this case. But there's no way to distinguish between this case and a rejection for a too big allocation, nor is it possible to predict if a currently used (and seemingly suitable) intent will be returned for reuse or not. As such, returning the error to the client and allow it to react seems to be the only sensible solution. In addition to this, commit ' |
History
|
|
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| mtk_rpmsg.c | ||
| qcom_glink_native.c | ||
| qcom_glink_native.h | ||
| qcom_glink_rpm.c | ||
| qcom_glink_smem.c | ||
| qcom_glink_ssr.c | ||
| qcom_glink_trace.h | ||
| qcom_smd.c | ||
| rpmsg_char.c | ||
| rpmsg_char.h | ||
| rpmsg_core.c | ||
| rpmsg_ctrl.c | ||
| rpmsg_internal.h | ||
| rpmsg_ns.c | ||
| virtio_rpmsg_bus.c | ||