From patchwork Thu Aug 24 07:21:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 9919255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0BED60353 for ; Thu, 24 Aug 2017 07:26:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2AA72885B for ; Thu, 24 Aug 2017 07:26:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C774228A5A; Thu, 24 Aug 2017 07:26:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6AE5B28B6D for ; Thu, 24 Aug 2017 07:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kVM5cXVaXvlvtvv8PUghAezFeze/hv3HJGiDJ6bkxrY=; b=ShTRHDTtx4vpEg8IDikBcxGMeI xXvFoEsu1sufvVccBct81PkiOakKIb14dtUPvY3+4SMkGHv7Sb0rTRueRjnntj4X0yous9hcpGTIE rgzRhBj4GIpAu2EGTx+JNVTS2MaGEEl/6qRGVll5Q4f6dw00uE3AwelMakU1VV+IOCvAqrqJPb8KS IWq0x0f0Qi6ZQKqRhHL3P2M7t0cQ2VzapP5r4k172rDs3uwhNYJXZiDBzrr4tDDqqkJ6RRx53GHCH YxVb5MbirLA/5Xl35rjgSIs0hZQ7hGDK22hnjYzWeDanplgKXl2AaOySSWAK/SkLLY+P1HOyvIfec m4JonG9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dkmWh-00045i-VM; Thu, 24 Aug 2017 07:26:03 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dkmTN-0008AI-Mc for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2017 07:22:41 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 001A06070A; Thu, 24 Aug 2017 07:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503559336; bh=LIh0LW8+tMgOBLh+SbV9QHKOHKOJjaJtduq5QpDKHkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E8JAKN1QQdUtxd4UJDYlcrQNYVjZ2Hqw9/+hauuJOCr5kRC4aEzCofvKdl4aN3vnY 1shply/9CgwrfXcgoc5zy5q9g75Fa+ufL7Ad3T6CjvhjPCPwMug/I72XB3jbd1n3+f mCs2hp7zOPnwgGrH+1sTMr73R2mJhcDnyY/twXAk= Received: from srichara-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sricharan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3312660717; Thu, 24 Aug 2017 07:22:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1503559333; bh=LIh0LW8+tMgOBLh+SbV9QHKOHKOJjaJtduq5QpDKHkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bfnSYr5+Z4VBuYMIcfjaV720tz40q/hKw6p25qXihJxeP/SsdrvfV5+OgdNco8xMP yPZFhu8k4pZBB4zBhC6/DWFP3SUJg7w1ad7UArzc62SowSJULZMUa+CnwiKtOuNOyr u8i314bPWV4FlixA5VgpGzAb2DPfp0Rw6cq5SxFo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3312660717 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sricharan@codeaurora.org From: Sricharan R To: ohad@wizery.com, bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 06/20] rpmsg: glink: Return -EAGAIN when there is no FIFO space Date: Thu, 24 Aug 2017 12:51:28 +0530 Message-Id: <1503559302-3744-7-git-send-email-sricharan@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503559302-3744-1-git-send-email-sricharan@codeaurora.org> References: <1503559302-3744-1-git-send-email-sricharan@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170824_002237_921916_F4205300 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sricharan@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The TX FIFO can be full, if the remote client has not read enough data (or) reading it slowly. So its nessecary to return -EAGAIN to the local client to enable retry. Signed-off-by: Sricharan R Acked-by: Arun Kumar Neelakantam --- drivers/rpmsg/qcom_glink_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index a6394cd..94b79e8 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -233,7 +233,7 @@ static int qcom_glink_tx(struct qcom_glink *glink, while (qcom_glink_tx_avail(glink) < tlen) { if (!wait) { - ret = -ENOMEM; + ret = -EAGAIN; goto out; }