public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Emanuele Ghidoli <ghidoliemanuele@gmail.com>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
	andre.draszik@linaro.org, rdbabiera@google.com,
	m.felsch@pengutronix.de, dan.carpenter@linaro.org,
	emanuele.ghidoli@toradex.com, parth.pancholi@toradex.com,
	francesco.dolcini@toradex.com, u.kleine-koenig@baylibre.com,
	linux-usb@vger.kernel.org, imx@lists.linux.dev, jun.li@nxp.com
Subject: Re: [PATCH v3 2/2] usb: typec: tcpci: set ALERT_MASK register after devm_request_threaded_irq()
Date: Wed, 18 Dec 2024 07:41:49 +0100	[thread overview]
Message-ID: <12af64d4-b9eb-480e-b6e9-9842d76901a4@gmail.com> (raw)
In-Reply-To: <20241218053120.7r4ytd6bqzcmsbcm@hippo>



On 18/12/2024 06:31, Xu Yang wrote:
> On Tue, Dec 17, 2024 at 09:29:36PM +0100, Emanuele Ghidoli wrote:
>>
>>
>> On 17/12/2024 17:35, Francesco Dolcini wrote:
>>> On Tue, Dec 17, 2024 at 05:12:08PM +0800, Xu Yang wrote:
>>>> With edge irq support, the ALERT event may be missed currently. The reason
>>>> is that ALERT_MASK register is written before devm_request_threaded_irq().
>>>> If ALERT event happens in this time gap, it will be missed and ALERT line
>>>> will not recover to high level. However, we don't meet this issue with
>>>> level irq. To avoid the issue, this will set ALERT_MASK register after
>>>> devm_request_threaded_irq() return.
>>>>
>>>> Fixes: 77e85107a771 ("usb: typec: tcpci: support edge irq")
>>>> Cc: stable@vger.kernel.org
>>>> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>>>
>>> I had an offline chat with a Emanuele (in Cc:) that worked on this a few
>>> weeks ago and he remember that he already tried a similar approach, but
>>> for some reason he did not work.
>>>
>>> He should be able to try this patch in a few days, but with the upcoming
>>> winter holidays he might not be super responsive.
>>>
>>> I wonder if we could wait a little before merging this to allow this
>>> testing to happen. Or maybe you can just test if this is working on your
>>> setup using edge interrupts (you would need to use only one TCPCI, for
>>> the test).
>>>
>>> Francesco
>>>
>>
>> Hi all,
>>
>> I was curious, so I tested the two patches. I can confirm that if both are applied, 
>> edge interrupts still work correctly.
>> However, with only the first patch applied, it does not work.
> 
> Yes. This is an expected results. So could this be regarded as a tested-by?
> I have tested edge irq before sending out the patches too.
> 
> Thanks,
> Xu Yang

Hello Xu,
I confirmed that the first patch introduces a regression, 
so I agree with Francesco and Dan about merging the two patches.

Anyway, I tested it.

Tested-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>

Regards,
Emanuele


  reply	other threads:[~2024-12-18  6:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  9:12 [PATCH v3 1/2] usb: typec: tcpci: fix NULL pointer issue on shared irq case Xu Yang
2024-12-17  9:12 ` [PATCH v3 2/2] usb: typec: tcpci: set ALERT_MASK register after devm_request_threaded_irq() Xu Yang
2024-12-17  9:29   ` Francesco Dolcini
2024-12-17  9:41     ` Xu Yang
2024-12-17  9:45       ` Francesco Dolcini
2024-12-17  9:49         ` Xu Yang
2024-12-17 10:45   ` Dan Carpenter
2024-12-18  5:49     ` Xu Yang
2024-12-17 16:35   ` Francesco Dolcini
2024-12-17 20:29     ` Emanuele Ghidoli
2024-12-18  5:31       ` Xu Yang
2024-12-18  6:41         ` Emanuele Ghidoli [this message]
2024-12-18  7:11           ` Xu Yang
2024-12-17  9:56 ` [PATCH v3 1/2] usb: typec: tcpci: fix NULL pointer issue on shared irq case Dan Carpenter
2024-12-18  5:45   ` Xu Yang
2024-12-18  9:35     ` Dan Carpenter

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=12af64d4-b9eb-480e-b6e9-9842d76901a4@gmail.com \
    --to=ghidoliemanuele@gmail.com \
    --cc=andre.draszik@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --cc=emanuele.ghidoli@toradex.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=francesco@dolcini.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=parth.pancholi@toradex.com \
    --cc=rdbabiera@google.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=xu.yang_2@nxp.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