From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752348AbdGDMu1 (ORCPT ); Tue, 4 Jul 2017 08:50:27 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:15892 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751960AbdGDMuZ (ORCPT ); Tue, 4 Jul 2017 08:50:25 -0400 Subject: Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq To: Grygorii Strashko , Tony Lindgren CC: "GregKroah-Hartmangregkh@linuxfoundation.org" , Felipe Balbi , "linux-omap@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Nori, Sekhar" References: <20170628233131.19114-1-grygorii.strashko@ti.com> <463ea19c-dc60-5926-56b4-0f10d2e23e94@ti.com> <20170629060353.GE3730@atomide.com> <9b8d09f8-a52d-9992-142d-b3727062b234@ti.com> From: Vignesh R Message-ID: <473f2c00-b57b-ce97-0d3a-d5da4622e9d4@ti.com> Date: Tue, 4 Jul 2017 18:20:10 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <9b8d09f8-a52d-9992-142d-b3727062b234@ti.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 7/3/2017 11:58 PM, Grygorii Strashko wrote: > > > On 07/02/2017 11:27 PM, Vignesh R wrote: >> Hi, >> >> On Saturday 01 July 2017 01:04 AM, Strashko, Grygorii wrote: >>> >>> >>> On 06/29/2017 01:03 AM, Tony Lindgren wrote: >>>> * Vignesh R [170628 21:21]: >>>>> >>>>> >>>>> On Thursday 29 June 2017 05:01 AM, Strashko, Grygorii wrote: >>>>>> IRQ_NOAUTOEN can't be used with shared IRQs and Kernel now will >>>>>> triggers >>>>>> warning if it happns, since commit 04c848d39879 ("genirq: Warn when >>>>>> IRQ_NOAUTOEN is used with shared interrupts"). And this is the >>>>>> case for >>>>>> OMAP DWC 3 driver. >>>>>> >>>>>> Hence, remove IRQ_NOAUTOEN flag and instead call disable_irq() before >>>>>> disabling PM runtime in probe error path handling. >>>>> >>>>> Or, how about requesting the irq at the end of probe after extcon >>>>> registration? >>>> >>>> Hmm yeah, what prevents the issue that we tried to fix with commit >>>> 12a7f17fac5b ("usb: dwc3: omap: fix race of pm runtime with irq handler >>>> in probe")? >>> >>> No, I think. There should be the disable_irq() call any way >>> before pm_runtime_put_sync(dev);| pm_runtime_disable(dev); - >>> once IRQ is requested driver can't know if IRQ handler is running now >>> or not >>> unless it will call disable_irq()/free_irq(). >>> >>> But, I've also thought about moving request_irq() down (seems >>> it can be moved even after of_platform_populate()). >>> looks like it can be separate patch. >>> >> >> commit 12a7f17fac5b says PM runtime can race with IRQ handler when >> deferred probing happening due to extcon, therefore IRQ_NOAUTOEN was set >> and disable_irq() call was added. If IRQ handler registration is moved >> to a place after of_platform_populate(), then we can be sure that extcon >> is registered and there wont be any deferred probe or race with irq >> handler and PM runtime. Would disable_irq() still be needed then? >> > > You might be correct, so feel free to send a patch. Ok, will send a patch moving irq registration after of_platform_populate().