Received: by 10.223.185.116 with SMTP id b49csp3579317wrg; Mon, 19 Feb 2018 02:25:26 -0800 (PST) X-Google-Smtp-Source: AH8x227KztNr4D0u86X2gipH44VjhUpqdYMxOF+X/unB5vVz3sZHKv5pKf+3hG73ZRC2NR5OZFkK X-Received: by 10.99.108.72 with SMTP id h69mr11756402pgc.302.1519035925899; Mon, 19 Feb 2018 02:25:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519035925; cv=none; d=google.com; s=arc-20160816; b=0xO10aVadH3CG8r0GLCk7v8XI3fwrEBRkPh/Wmzy5weVo9PNruEyY1KL3ON1ZWdrqk s+WQHID8g/2psnjHuhy0zQhxXKvCIicYAze6nWUTc5yvyjUZ+PB2/4CRoBAJRGGOxSJ8 +SfEsTkatCia2qlxDjCn634en8EKXnmh/bg7820rB5EAdp8YULx+l+owmbKEbnIaahgV kULlcbwTmM4h/8uC3JS6XpTyT6skGmc1WtXHg2M+5hB9t3SBF1E1GkWP8cheUqKbHEOw FxkPLw6foJAz+30Ffuo5p+7Ol8ldW/gQlfs5iNT66ZcNEFC65RSfHyX2QrR+PApl/UMc 1H+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=mler8RXdCavbdWsGiZblQ05+Rt9qsPqbUJk4IM2WCek=; b=gpmx/NXBH6TDtT7KAF1F1gi0htxSktyVW31PqoDS1lQn7cHSTMFRAFZkNqDbiwk2nQ eGkzzh1or+29JNuexgWlUcCFaJFnwC+QgAZJPpuLJS5rU6w/N1UKAurTtOkWd7l8bkol Ad5WMnZbXPyi6m/XbiR9l7lzVZjsCDeF4ztlZlXrh+UbPxCqw4N3a4YFYxR0wVxWstFs Q2q/g/ZtseLXIr96s19+1eol/cLCKdLlc2pspgBgAKJus0+vSKpsYK/KXWCerULKmH1W XINvnYBDqFVB7Hwq0eCnFCqXwiQyhbrAQY9bqT+UBld12V2LrXwb05PG1eIvH51kEvDk HNWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXzEgRf5; dkim=pass header.i=@codeaurora.org header.s=default header.b=bOZorXiy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si1024762pgr.170.2018.02.19.02.25.11; Mon, 19 Feb 2018 02:25:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXzEgRf5; dkim=pass header.i=@codeaurora.org header.s=default header.b=bOZorXiy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566AbeBSKYM (ORCPT + 99 others); Mon, 19 Feb 2018 05:24:12 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35816 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499AbeBSKYK (ORCPT ); Mon, 19 Feb 2018 05:24:10 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2037760960; Mon, 19 Feb 2018 10:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519035850; bh=6QaPOVtUFW91kTYAZKWTsxPC0jqMhqGkPP8YNIfws+E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UXzEgRf5VpHYE1SnVsIajTGd3Jc8gJVwMUv5TiM2FRTSZfMZ7JmECJbiVOdMMGNsM RjyQ16yZ5zOr69LaOwJKiyY6aNk35YwOpwcF2ZZh+YyB7UH06y+wQz0XoAZTI8Y11M owZ2HkEx06IJ6SGIQTmAu6wJEVihd2QsA62V4Sj0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 7373D60117; Mon, 19 Feb 2018 10:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519035849; bh=6QaPOVtUFW91kTYAZKWTsxPC0jqMhqGkPP8YNIfws+E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bOZorXiy7r3FWyyhsakYMr1XVC7D/HPTlV4dZLh0OhsF9XYl6a76rF71zc6YXB8t4 +ESJueKiT8vjuTFMERqvQXhD3Dz0jzPQ/htsJ57AB9wIAeTdC1WM+/mYY7zxA72vLB 0w82mlWZkehf40n4E8mHedcPnjPMigBDEzjYyO3w= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 19 Feb 2018 15:54:09 +0530 From: Abhishek Sahu To: Sricharan R Cc: Andy Gross , Wolfram Sang , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/12] i2c: qup: fixed releasing dma without flush operation completion In-Reply-To: <0ff28076-b105-9280-a7e0-767f923768fa@codeaurora.org> References: <1517644697-30806-1-git-send-email-absahu@codeaurora.org> <1517644697-30806-2-git-send-email-absahu@codeaurora.org> <0ff28076-b105-9280-a7e0-767f923768fa@codeaurora.org> Message-ID: <4d6ece838847032b87af6374264ea21b@codeaurora.org> X-Sender: absahu@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-08 19:33, Sricharan R wrote: > Hi Abhishek, > > On 2/3/2018 1:28 PM, Abhishek Sahu wrote: >> The QUP BSLP BAM generates the following error sometimes if the >> current I2C DMA transfer fails and the flush operation has been >> scheduled >> >> “bam-dma-engine 7884000.dma: Cannot free busy channel” >> >> If any I2C error comes during BAM DMA transfer, then the QUP I2C >> interrupt will be generated and the flush operation will be >> carried out to make i2c consume all scheduled DMA transfer. >> Currently, the same completion structure is being used for BAM >> transfer which has already completed without reinit. It will make >> flush operation wait_for_completion_timeout completed immediately >> and will proceed for freeing the DMA resources where the >> descriptors are still in process. >> >> Signed-off-by: Abhishek Sahu >> --- >> drivers/i2c/busses/i2c-qup.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/i2c/busses/i2c-qup.c >> b/drivers/i2c/busses/i2c-qup.c >> index 08f8e01..9faa26c41a 100644 >> --- a/drivers/i2c/busses/i2c-qup.c >> +++ b/drivers/i2c/busses/i2c-qup.c >> @@ -1,5 +1,5 @@ >> /* >> - * Copyright (c) 2009-2013, The Linux Foundation. All rights >> reserved. >> + * Copyright (c) 2009-2013, 2016-2018, The Linux Foundation. All >> rights reserved. > > Not sure, if this was an intended change. But given that you are fixing > this, Thanks Sricharan. Since this is the first patch, so I updated the year. > you can change the header to the new SPDX one. > Yes that would be better. I will fix that also. Thanks, Abhishek >> * Copyright (c) 2014, Sony Mobile Communications AB. >> * >> * >> @@ -844,6 +844,8 @@ static int qup_i2c_bam_do_xfer(struct qup_i2c_dev >> *qup, struct i2c_msg *msg, >> } >> >> if (ret || qup->bus_err || qup->qup_err) { >> + reinit_completion(&qup->xfer); >> + >> if (qup_i2c_change_state(qup, QUP_RUN_STATE)) { >> dev_err(qup->dev, "change to run state timed out"); >> goto desc_err; >> > > Except for the above nit, > Acked-by: Sricharan R > > Regards, > Sricharan