From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:33037 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953Ab1A0SyY convert rfc822-to-8bit (ORCPT ); Thu, 27 Jan 2011 13:54:24 -0500 From: Kevin Hilman To: Vitaly Wool Cc: "Rafael J. Wysocki" , linux-mmc@vger.kernel.org, linux-wireless@vger.kernel.org, Ido Yariv , linux-pm@lists.linux-foundation.org, Johannes Berg Subject: Re: [linux-pm] subtle pm_runtime_put_sync race and sdio functions References: <201012221329.40251.rjw@sisk.pl> <87k4hrtfcb.fsf@ti.com> Date: Thu, 27 Jan 2011 10:54:19 -0800 In-Reply-To: (Vitaly Wool's message of "Thu, 27 Jan 2011 19:20:10 +0100") Message-ID: <87bp32npno.fsf@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: Vitaly Wool writes: > Hi Kevin, > >> Therefore, what is ideally needed is the ability for A's suspend to >> simply call pm_runtime_suspend() so the subsystem can do the work. >> However, since runtime transitions are locked out by this time, that >> doesn't work.  IOW, what is needed is a way for a system suspend to say >> "please finish the runtime suspend that was already requested." >> >> What I've done to work around this in driver A is to manually check >> pm_runtime_suspended() and directly call the subsystem's runtime >> suspend/resume (patch below[1].  NOTE, I've used the _noirq methods to >> ensure device A is available when device B needs it.) > > suppose this driver runs on a platform that has runtime PM disabled. > How is it going to work then? > Then pm_runtime_suspended() will be false, and the bus methods will suspend the device. Kevin