mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Vignesh R <vigneshr@ti.com>, Tony Lindgren <tony@atomide.com>
Cc: "GregKroah-Hartmangregkh@linuxfoundation.org" 
	<GregKroah-Hartmangregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Nori, Sekhar" <nsekhar@ti.com>
Subject: Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq
Date: Mon, 3 Jul 2017 13:28:37 -0500	[thread overview]
Message-ID: <9b8d09f8-a52d-9992-142d-b3727062b234@ti.com> (raw)
In-Reply-To: <c54d656c-469f-b81d-5af4-91aec6f9da20@ti.com>



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 <vigneshr@ti.com> [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.

-- 
regards,
-grygorii

  reply	other threads:[~2017-07-03 18:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 23:31 Grygorii Strashko
2017-06-29  4:21 ` Vignesh R
2017-06-29  6:03   ` Tony Lindgren
2017-06-30 19:34     ` Grygorii Strashko
2017-07-03  4:27       ` Vignesh R
2017-07-03 18:28         ` Grygorii Strashko [this message]
2017-07-04 12:50           ` Vignesh R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b8d09f8-a52d-9992-142d-b3727062b234@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=GregKroah-Hartmangregkh@linuxfoundation.org \
    --cc=balbi@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®