aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorVidhoon Viswanathan <vidhoon@ti.com>2012-05-02 05:34:19 -0700
committerDmytro Kedrovskyi <x0169235@ti.com>2012-05-17 16:47:26 +0300
commitf7703d980590a62d58b079f0d7f9e72373efde83 (patch)
tree4127db1ae560960498f31060b8b98b9f324cef3e /drivers/rpmsg
parent2bc2382969610aa9ab751a810fb4b73755bf783a (diff)
downloadkernel_samsung_espresso10-f7703d980590a62d58b079f0d7f9e72373efde83.zip
kernel_samsung_espresso10-f7703d980590a62d58b079f0d7f9e72373efde83.tar.gz
kernel_samsung_espresso10-f7703d980590a62d58b079f0d7f9e72373efde83.tar.bz2
rpmsg: omx: return ENXIO in rpmsg_omx_write
The error code, ENXIO is used in rpmsg_omx driver to indicate a terminal error on the remote processor side. This status is maintained during the recovery of the remote processor, while the cdev gets reinitialized/recreated. The rpmsg_omx's write file operation is currently not returning this error. This has been added now to have it behave in the same way as the read file operation. Change-Id: I61d6e6c07aa39208d913da622ed32d809c51d409 Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/rpmsg_omx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rpmsg/rpmsg_omx.c b/drivers/rpmsg/rpmsg_omx.c
index df37a1b..f234812 100644
--- a/drivers/rpmsg/rpmsg_omx.c
+++ b/drivers/rpmsg/rpmsg_omx.c
@@ -599,6 +599,9 @@ static ssize_t rpmsg_omx_write(struct file *filp, const char __user *ubuf,
struct omx_msg_hdr *hdr = (struct omx_msg_hdr *) kbuf;
int use, ret;
+ if (omx->state == OMX_FAIL)
+ return -ENXIO;
+
if (omx->state != OMX_CONNECTED)
return -ENOTCONN;