From patchwork Mon Jan 9 17:03:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 90539 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp177051qgi; Mon, 9 Jan 2017 09:03:51 -0800 (PST) X-Received: by 10.99.253.85 with SMTP id m21mr165123901pgj.38.1483981431125; Mon, 09 Jan 2017 09:03:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si6466091pgp.76.2017.01.09.09.03.50; Mon, 09 Jan 2017 09:03:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762948AbdAIRDs (ORCPT + 4 others); Mon, 9 Jan 2017 12:03:48 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38690 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762955AbdAIRDo (ORCPT ); Mon, 9 Jan 2017 12:03:44 -0500 Received: by mail-wm0-f51.google.com with SMTP id k184so128297938wme.1 for ; Mon, 09 Jan 2017 09:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IOPdPyro8RvAF8oFE5jOHlVEYDARnrO+X9JyqwP/RTo=; b=2KTKf075Pv2tx0gvpHapFpbSzpuEkbqgj2vwOGM7QGuOQpPVJasRAfo0mLsl0ufrP8 ZVbkBPendRD13l1yLclc9cDD7/gd4FXutz0Xb/7ZsvfiVTrQS96TuPFb5sQFV/+5XIqn 8nKDfib1BrexhDVmgDAzauTn51X+uIDFwcVewLqakvZr9PXeQZc+MTkG1rIVpLy3Up9L F4A6YsEyXEEzB/+C0vrvMaslaUSvZeXBbZiQkxhbwz8bGCDUEcSHw8MJyrHwUj3AxHnc Nfwp5ig5Ux3lbkL1FN7jMuzRHBemGE//TKB0cKqcS0u4mANU/IeKNQ4Znp4fmmcdC4JN kdCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IOPdPyro8RvAF8oFE5jOHlVEYDARnrO+X9JyqwP/RTo=; b=C4RfqkQqqzsp3GrKmHm2QwxvN/44iLTqXmh80gXKYubLlXKmDhkMQYXTNh39UYXLXt NSrnmU4dizsrq+o70VaxRgIy+nDShE8G0KHCEjNKJ/if6H47bE+j/O62trEMnRPr8usM Oh1zK6w6wTI0kOMzvj0wrBAUH/lf7NsqNLgFNCoFp/bEvYnXZTGiath4odkeLZEeWuVd R7ZjwN3CMqtPjvAdC58LrnOPqmvrY+EiRZCwXt6u89J58EbCDJjCQPFHYsUO2gbgx/LI gEdU6iJWafTD1RtXucQsGrPHVBgJrDQCTfo/5pT/uqRoK1sYVe1Jl7obsoUwE15dgdn1 GBaA== X-Gm-Message-State: AIkVDXJ1Q6rNfQGG4nGxzcIoMFh66L/vmMga1iWIaEc6RDDaRtdi46cXdxx02MKJfp/kYbrm X-Received: by 10.28.16.70 with SMTP id 67mr4698796wmq.53.1483981422690; Mon, 09 Jan 2017 09:03:42 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l67sm19775913wmf.20.2017.01.09.09.03.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jan 2017 09:03:42 -0800 (PST) From: Alexandre Bailon To: vinod.koul@intel.com Cc: dmaengine@vger.kernel.org, linux-usb@vger.kernel.org, nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, tony@atomide.com, linux-omap@vger.kernel.org, andy.shevchenko@gmail.com, Alexandre Bailon Subject: [PATCH v2 2/2] dmaengine: cppi41: Ignore EINPROGRESS for PM runtime in interrupt handler Date: Mon, 9 Jan 2017 18:03:37 +0100 Message-Id: <20170109170337.6957-3-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170109170337.6957-1-abailon@baylibre.com> References: <20170109170337.6957-1-abailon@baylibre.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org We can occasionally get -EINPROGRESS for pm_runtime_get. This is happening when an interrupt is fired before PM runtime had time to update the PM state to RESUMED. In that case, don't print any error. Signed-off-by: Alexandre Bailon --- drivers/dma/cppi41.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 025fee4..2306020 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -320,7 +320,7 @@ static irqreturn_t cppi41_irq(int irq, void *data) int error; error = pm_runtime_get(cdd->ddev.dev); - if (error < 0) + if ((error != -EINPROGRESS) && error < 0) dev_err(cdd->ddev.dev, "%s pm runtime get: %i\n", __func__, error); @@ -492,8 +492,7 @@ static void cppi41_dma_issue_pending(struct dma_chan *chan) */ if (error == -EINPROGRESS) { spin_lock_irqsave(&cdd->lock, flags); - if (list_empty(&cdd->pending)) - active = true; + active = !!list_empty(&cdd->pending); spin_unlock_irqrestore(&cdd->lock, flags); } }