Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2049146imu; Wed, 12 Dec 2018 08:39:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/X+JNizGgdshkEkWA4pz3LJ8FZGQXqhI1hyg8xNhlZdxLc5gKaZwhZ40eLLKwibTsg5r8nb X-Received: by 2002:a17:902:e18c:: with SMTP id cd12mr19248056plb.279.1544632799747; Wed, 12 Dec 2018 08:39:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544632799; cv=none; d=google.com; s=arc-20160816; b=nKuXPg8ViKwREnJW2NxU8JJxyPapUhgkjdtjHGwBCzxpldQya+9H6rDENq+rzYuCID xcUCG55HmAB0F8TodWclWSBNZf5ArLdnPAa823VHGoy6+Ti9pfnixDzWmXBkeFmKb5po Xl3JOgLt1VWoLAzJ99dTwWM+LYMvsxfjXSpauccVFDi+Dqx78Olv/6auoVdReK2xtj6d 2n89jUKbk/xmkC0eaIlIyBH780f4crjIt8GTWdW+y/iTewPxhU994OtGvV/aZi4qluwH ql7+zl69HPTGQVbtJHPPPyEFmBV9bXPXbdWLpw46GvSXGbVZvK6k1JsJSdP+pEb8Zf+w ta5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=jihNBbmKqh8cz5W1WyigqLLSsawlyEn+aIg95rkhU64=; b=g4VPAsSZyMWDhW0Mg1y3+p7FXKT7a6awPDggq1umRecX7jSAR8Ezbx1qLrLvVZss+2 yFeRY8pNDzY2yS65eFDAVQGWRdWBNhwu7Qoogz/6pag+anZrOdbNLq1LHdmqCORGqcLT mJqg/1wD7aZTk0UVIzkscGDeZe1u6w0aXeVO1W9wMNcTOhuBrbZ2mMf9docadOCLNBPA Z6jlQ1BlZBdm8ajIvPl+Mf5q9GO4+SpbrRbgn2q/r7gt+224G0XYfR1YzmWElureiME4 f1XXm9d0VGIOhjAu+xGDbnxQ61r2qMBd0pSq156MhDnWD34iwJ1F1+QrOLmC5arurias wloA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ubzuW656; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si16669183pli.225.2018.12.12.08.39.44; Wed, 12 Dec 2018 08:39:59 -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=@ti.com header.s=ti-com-17Q1 header.b=ubzuW656; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727969AbeLLQib (ORCPT + 99 others); Wed, 12 Dec 2018 11:38:31 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52134 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727897AbeLLQia (ORCPT ); Wed, 12 Dec 2018 11:38:30 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wBCGcSdf033596; Wed, 12 Dec 2018 10:38:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544632708; bh=jihNBbmKqh8cz5W1WyigqLLSsawlyEn+aIg95rkhU64=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ubzuW656ImkVEipyA+04kIKyi7zPgXOZ3COnGPX84bmrKwpzj502czgPfM3lkVxye BxTRgIR5fbhdtu5vrGIKHOxckVYcEHQvRi4xNLEJfxETFu5d8ETBlW+QRbpFqziVS6 Niz0myIp8sj1LRn/Bi1k6vLosbeNKH/AOdTwOong= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wBCGcS0f020718 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Dec 2018 10:38:28 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 12 Dec 2018 10:38:28 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Wed, 12 Dec 2018 10:38:28 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wBCGcSn3030218; Wed, 12 Dec 2018 10:38:28 -0600 Date: Wed, 12 Dec 2018 10:38:28 -0600 From: Bin Liu To: Greg Kroah-Hartman CC: , , Peter Ujfalusi , Vinod Koul Subject: Re: [PATCH 3.18 48/54] dmaengine: cppi41: delete channel from pending list when stop channel Message-ID: <20181212163828.GA30432@uda0271908> Mail-Followup-To: Bin Liu , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Ujfalusi , Vinod Koul References: <20181211151546.010073210@linuxfoundation.org> <20181211151548.757658735@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20181211151548.757658735@linuxfoundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Tue, Dec 11, 2018 at 04:41:36PM +0100, Greg Kroah-Hartman wrote: > 3.18-stable review patch. If anyone has any objections, please let me know. Please drop this patch. It really should go back to v4.9 but not older. The Fixes should instead be fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") I am sorry for the noise. > ------------------ > > From: Bin Liu > > commit 59861547ec9a9736e7882f6fb0c096a720ff811a upstream. > > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 && not in .pending list > - pending: .chan_busy == 0 && in .pending list > - busy: .chan_busy == 1 && not in .pending list > > There are cases in which the cppi channel could be in the pending state > when cppi41_dma_issue_pending() is called after cppi41_runtime_suspend() > is called. > > cppi41_stop_chan() has a bug for these cases to set channels to idle state. > It only checks the .chan_busy flag, but not the .pending list, then later > when cppi41_runtime_resume() is called the channels in .pending list will > be transitioned to busy state. > > Removing channels from the .pending list solves the problem. > > Fixes: 975faaeb9985 ("dma: cppi41: start tear down only if channel is busy") > Cc: stable@vger.kernel.org # v3.15+ > Signed-off-by: Bin Liu > Reviewed-by: Peter Ujfalusi > Signed-off-by: Vinod Koul > Signed-off-by: Greg Kroah-Hartman Regards, -Bin.