From mboxrd@z Thu Jan 1 00:00:00 1970 From: Todd Poynor Subject: Re: [PATCH 5/5 v4] mfd: omap: usb: Runtime PM support Date: Fri, 12 Aug 2011 14:30:37 -0700 Message-ID: <20110812213037.GA24803@google.com> References: <1312899309-24067-1-git-send-email-keshava_mgowda@ti.com> <1312899309-24067-2-git-send-email-keshava_mgowda@ti.com> <1312899309-24067-3-git-send-email-keshava_mgowda@ti.com> <1312899309-24067-4-git-send-email-keshava_mgowda@ti.com> <1312899309-24067-5-git-send-email-keshava_mgowda@ti.com> <1312899309-24067-6-git-send-email-keshava_mgowda@ti.com> <20110810163142.GA10156@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from smtp-out.google.com ([216.239.44.51]:34320 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116Ab1HLVa5 (ORCPT ); Fri, 12 Aug 2011 17:30:57 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Munegowda, Keshava" Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, balbi@ti.com, gadiyar@ti.com, sameo@linux.intel.com, parthab@india.ti.com, tony@atomide.com, khilman@ti.com, b-cousson@ti.com, paul@pwsan.com, johnstul@us.ibm.com, vishwanath.bs@ti.com, nm@ti.com, vikram.pandita@ti.com On Fri, Aug 12, 2011 at 12:20:21PM +0530, Munegowda, Keshava wrote: > On Wed, Aug 10, 2011 at 10:01 PM, Todd Poynor = wrote: > >> @@ -913,12 +598,15 @@ static int usbhs_enable(struct device *dev) > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (pdata= ->ehci_data->reset_gpio_port[1], 1); > >> =A0 =A0 =A0 } > >> > >> -end_count: > >> - =A0 =A0 omap->count++; > >> + =A0 =A0 pm_runtime_put_sync(dev); > >> =A0 =A0 =A0 spin_unlock_irqrestore(&omap->lock, flags); > > > > Is pm_runtime_irq_safe() needed (else I think runtime PM callbacks = may > > re-enable IRQs... or there's the new *_suspend runtime PM calls tha= t > > may avoid this)? >=20 > pm_runtime_irq_safe() is not required; usbhs does not have a parent > and it is the parent driver of > ehci and ohci drivers. But the above expects IRQs to be disabled during the pm_runtime_put_sync, and synchronous calls can turn IRQs back on in rpm_idle: if (callback) { spin_unlock_irq(&dev->power.lock); callback(dev); I see other folks who know this better than me are discussing USB run time PM and might_sleep contexts, so I'll note this concern and let others chime in if they think there's a real problem here. Todd -- To unsubscribe from this list: send the line "unsubscribe linux-omap" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html