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: 9919263 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 55EC460353 for ; Thu, 24 Aug 2017 07:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4859B28A48 for ; Thu, 24 Aug 2017 07:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D59128AFB; Thu, 24 Aug 2017 07:26:25 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77CAE28A48 for ; Thu, 24 Aug 2017 07:26:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751414AbdHXHWR (ORCPT ); Thu, 24 Aug 2017 03:22:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60642 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbdHXHWP (ORCPT ); Thu, 24 Aug 2017 03:22:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9FC3D60725; 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=1503559334; bh=LIh0LW8+tMgOBLh+SbV9QHKOHKOJjaJtduq5QpDKHkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pN7FIHMZsYKHoQY00jl1H1DtiCKCV7PJQunL019o/mlyGlbvNVvL1V1Ma6+n56IyK lmTb4ketSdfH2/6vX1IdWT/MXrZRtQZ+c85nrLz4gy6jtg+D0o0ZYCKgTFZnA6yQ1U 0b8zwPw9pQUM0qKSXViOc5gRrRz7WX+LEGVdUH/4= 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 Cc: sricharan@codeaurora.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> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.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; }