Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2052205imu; Wed, 12 Dec 2018 08:43:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/VsupQ79CZrtzjiVlE8Ba7Q4RJ/J5RcbPuKmbviJO23bHd7W21OOeEseV5nkbJpvklWIFtN X-Received: by 2002:a62:61c3:: with SMTP id v186mr20997358pfb.55.1544633009240; Wed, 12 Dec 2018 08:43:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544633009; cv=none; d=google.com; s=arc-20160816; b=F1ucuhRLErkuT/evC8QnWKybNlLgxAvuAQdmGDUb/R7bvvbM9tp5o6CtrwUcLK7OLF j+LruOhnNaZCdjPk4fP81AcZc9heLYkJQKQM/rUvMOJaRVpUvfAzFYnmYFpn8OFJH0as GvnafnQd6Ev0Q/5W9tU1/9OBP3g9Mo3SJXnEvnadqtrkqEv4PI+xbLI5JeyI+28pHhla dsChkxL2HvkntWw0HhIF2iRm44EL+s3lA+CM8PyumNf1LhOhydg9kt88U3PMahLYOpmi ECrZc3EfpKuqfW77l3nYWdAM7RrBMgsSqdbfzsa8uv4zK/x3hnQzmHHlj3Yys0SY4fWO ARSw== 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=PEUIKOM5yNF/zaWdsp5iT8qdaevq7r5XBOEcPESK+9w=; b=Jzu/tnk63yG+2ya/hICNXTICTOYSBPJnyH6QZ/tO3WAjhvPywyf4/PIHbk90AcXO8T iRwevJEHIR6DoVhkT9spyhs+uMx2Y7eLE6/+/DHb7d/ugDcvAzcurJaNEw0vn7vu2n5A IdveieHeQUndI8n/p08WJ2c8DGDgyDi/Cat4sqh/PN2Mn/r4vXZvcGtHTS9tZN7C9LNj Cs6AFUFnheknLoXNG5mE7lXf1eV6WHweXFI6Tne+N00sMKwFQZvolIKk5AZa5gvS47fV V4KS6rGNdbHhePa+PgSJb2qzhAyAnOZJGUvBy6NBrEXdxvJoYakMZMUzGPzq5FPXGlNk K62Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Y728RWkN; 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 t136si16824795pfc.262.2018.12.12.08.43.13; Wed, 12 Dec 2018 08:43:29 -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=Y728RWkN; 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 S1727927AbeLLQkt (ORCPT + 99 others); Wed, 12 Dec 2018 11:40:49 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52392 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbeLLQkt (ORCPT ); Wed, 12 Dec 2018 11:40:49 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wBCGelEd034003; Wed, 12 Dec 2018 10:40:47 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544632847; bh=PEUIKOM5yNF/zaWdsp5iT8qdaevq7r5XBOEcPESK+9w=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=Y728RWkNeh1DD/8f2bVi6+sunwLstRNeVCn4FJTRrS49Mcucj55wTczksLTnxPfc/ 0LVmdHFsB1itQAeUxlfmoeoyb/EsxRie6QfaWZPihKNHaKrItjUlpxIJ1l7Bjvb+ZO BrRByXFeFqr+brNR4eWXXZgIaHnoh1baaFuSWqm0= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wBCGelbX118697 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Dec 2018 10:40:47 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE100.ent.ti.com (157.170.170.30) 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:40:47 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE113.ent.ti.com (157.170.170.24) 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:40:47 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wBCGel3C002065; Wed, 12 Dec 2018 10:40:47 -0600 Date: Wed, 12 Dec 2018 10:40:47 -0600 From: Bin Liu To: Greg Kroah-Hartman CC: , , Peter Ujfalusi , Vinod Koul Subject: Re: [PATCH 4.4 81/91] dmaengine: cppi41: delete channel from pending list when stop channel Message-ID: <20181212164047.GB30432@uda0271908> Mail-Followup-To: Bin Liu , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Ujfalusi , Vinod Koul References: <20181211151606.026852373@linuxfoundation.org> <20181211151613.281713570@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20181211151613.281713570@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:40PM +0100, Greg Kroah-Hartman wrote: > 4.4-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.