From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Fernandes Subject: Re: [PATCH v4] ARM: omap: edma: add suspend suspend/resume hooks Date: Wed, 6 Nov 2013 11:36:32 -0600 Message-ID: <527A7E20.4040107@ti.com> References: <1383164468-4610-1-git-send-email-zonque@gmail.com> Reply-To: joelf@ti.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Vaibhav Bedia Cc: Nishanth Menon , "linux-omap@vger.kernel.org" , balajitk@ti.com, s.neumann@raumfeld.com, Sekhar Nori , gururaja.hebbar@ti.com, Russ Dill , Daniel Mack , Linux ARM Kernel List , Matt Porter List-Id: linux-omap@vger.kernel.org Hi Vaibhav, On 10/31/2013 05:25 PM, Vaibhav Bedia wrote: > Hi Daniel, > > On Wed, Oct 30, 2013 at 4:21 PM, Daniel Mack wrote: > [...] >> + >> +static SIMPLE_DEV_PM_OPS(edma_pm_ops, edma_pm_suspend, edma_pm_resume); >> + >> static struct platform_driver edma_driver = { >> .driver = { >> .name = "edma", >> + .pm = &edma_pm_ops, >> .of_match_table = edma_of_ids, >> }, > > A while back we discovered a nasty race condition here that had us move the EDMA > PM callbacks to the noirq phase. IIRC the MMC driver was resuming > before the EDMA > driver had a chance to run and that was leading to a deadlock. I am > not sure how to force > this scenario but i do remember spending time debugging this on a > random codebase. > Maybe some else has some better ideas on how to force this race condition... I think you're talking about the patch at [1] which is not upstream. A quick question with my limited knowledge of suspend/resume- How can there be pending I/O operations between suspend/resume cycles? The sync is done before suspend, so I don't understand how one is receiving a response from the card after resume before EDMA can resume? I'd imagine that until all devices are resumed, there will be no I/O operation issued. Let me know your thoughts. thanks, -Joel [1] https://www.gitorious.org/x0148406-public/linux-kernel/commit/b81bf04091986fa3893f31955564594567be3b61 From mboxrd@z Thu Jan 1 00:00:00 1970 From: joelf@ti.com (Joel Fernandes) Date: Wed, 6 Nov 2013 11:36:32 -0600 Subject: [PATCH v4] ARM: omap: edma: add suspend suspend/resume hooks In-Reply-To: References: <1383164468-4610-1-git-send-email-zonque@gmail.com> Message-ID: <527A7E20.4040107@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Vaibhav, On 10/31/2013 05:25 PM, Vaibhav Bedia wrote: > Hi Daniel, > > On Wed, Oct 30, 2013 at 4:21 PM, Daniel Mack wrote: > [...] >> + >> +static SIMPLE_DEV_PM_OPS(edma_pm_ops, edma_pm_suspend, edma_pm_resume); >> + >> static struct platform_driver edma_driver = { >> .driver = { >> .name = "edma", >> + .pm = &edma_pm_ops, >> .of_match_table = edma_of_ids, >> }, > > A while back we discovered a nasty race condition here that had us move the EDMA > PM callbacks to the noirq phase. IIRC the MMC driver was resuming > before the EDMA > driver had a chance to run and that was leading to a deadlock. I am > not sure how to force > this scenario but i do remember spending time debugging this on a > random codebase. > Maybe some else has some better ideas on how to force this race condition... I think you're talking about the patch at [1] which is not upstream. A quick question with my limited knowledge of suspend/resume- How can there be pending I/O operations between suspend/resume cycles? The sync is done before suspend, so I don't understand how one is receiving a response from the card after resume before EDMA can resume? I'd imagine that until all devices are resumed, there will be no I/O operation issued. Let me know your thoughts. thanks, -Joel [1] https://www.gitorious.org/x0148406-public/linux-kernel/commit/b81bf04091986fa3893f31955564594567be3b61