From patchwork Wed Feb 13 10:43:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 2135211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id DEF71DFE75 for ; Wed, 13 Feb 2013 10:47:27 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5ZoV-0004yA-DO; Wed, 13 Feb 2013 10:43:43 +0000 Received: from mail-pa0-f43.google.com ([209.85.220.43]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5ZoT-0004xm-41 for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2013 10:43:41 +0000 Received: by mail-pa0-f43.google.com with SMTP id bh2so647307pad.30 for ; Wed, 13 Feb 2013 02:43:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=V1qB3sWudSw286veSOykD0Z8BJT10Qix4/rY+YsYil0=; b=L3WJluVe6nHS3yfEqB9wXmqAkR6zp7LCVxpuhZfh4VeYUclgkk917LuCQJb75waYtc h08xRK0jbR9vySa5rW3kjFo4nuGkLTooWXNHXwZMqawGWhqdhZQb019D+ec7dTJHKAou K7zNtaUxHV9T28XGbs8B5OVTCnzSSAUX5rpSBTfx2prQ1jMxqZise2XsasCUY+4sePzi SjWabTKNV1lVsCCIeFiqBHxHaHdE1/qH6Twoq+W3jdFNYIXt+vgS+ROaFJYtG94fLYA9 ClISJz25t+nTFOcA/0+EIRoO8szlpJgcBHJsi4UHQaL7m2kh/NrecsGApm+8z2XA1tU6 d2uQ== X-Received: by 10.66.72.201 with SMTP id f9mr62711612pav.38.1360752218803; Wed, 13 Feb 2013 02:43:38 -0800 (PST) Received: from localhost.localdomain ([117.214.200.180]) by mx.google.com with ESMTPS id c3sm38822368pax.9.2013.02.13.02.43.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Feb 2013 02:43:37 -0800 (PST) From: Jassi Brar To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] DMA: PL330: allow submitting 2 requests at a time Date: Wed, 13 Feb 2013 16:13:14 +0530 Message-Id: <1360752194-6506-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQk3/ssNcKWFud/4w/AKnuQk8BPTHBDtaTyhnXQyfr1v4Fy2BN8L3t7pN0PSbn2U90xXW1eq X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130213_054341_233826_E0E180C5 X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.43 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: vinod.koul@intel.com, Jassi Brar , dirac3000@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Fix the logic to allow mc programming of second transfer after first has been done, by removing immediate return upon success and iterating until we detect QFull or DMAC dying. Reported-by: Alvaro Moran Tested-by: Alvaro Moran Signed-off-by: Jassi Brar --- drivers/dma/pl330.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 80680ee..c1a867e 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2282,13 +2282,12 @@ static inline void fill_queue(struct dma_pl330_chan *pch) /* If already submitted */ if (desc->status == BUSY) - break; + continue; ret = pl330_submit_req(pch->pl330_chid, &desc->req); if (!ret) { desc->status = BUSY; - break; } else if (ret == -EAGAIN) { /* QFull or DMAC Dying */ break;