From: Francesco Dolcini <francesco@dolcini.it>
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 v2 2/2] usb: typec: tcpci: write ALERT_MASK after devm_request_threaded_irq()
Date: Tue, 17 Dec 2024 10:20:16 +0100 [thread overview]
Message-ID: <20241217092016.GA25802@francesco-nb> (raw)
In-Reply-To: <20241217085407.myhb6tvbchvlsruj@hippo>
On Tue, Dec 17, 2024 at 04:54:07PM +0800, Xu Yang wrote:
> On Mon, Dec 16, 2024 at 07:55:40PM +0100, Francesco Dolcini wrote:
> > On Thu, Dec 12, 2024 at 08:24:09PM +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 can't meet this issue with
> > > level irq. To avoid the issue, this will add a flag set_alert_mask. So
> > > ALERT_MASK can be written after devm_request_threaded_irq() is called. The
> > > behavior of tcpm_init() keeps unchanged.
> > >
> > > Fixes: 77e85107a771 ("usb: typec: tcpci: support edge irq")
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> >
> > I wonder if this should be squashed together with the first commit,
> > given you re-introduce an issue with the previous commit.
>
> No. One patch normally should do one thing. To support edge irq, commit
> 77e85107a771 cause NULL ponter issue so path 1 fix it, it also didn't
> handle irq or alert_mask correctly, then patch 2 is needed.
Sure. And you also want your commit to be bi-sectable, your first patch
introduce a bug to fix another one, and than you fix it in the second one.
In any case, Greg will tell if he wants something different here or not.
Francesco
prev parent reply other threads:[~2024-12-17 9:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 12:24 [PATCH v2 1/2] usb: typec: tcpci: fix NULL pointer issue on shared irq case Xu Yang
2024-12-12 12:24 ` [PATCH v2 2/2] usb: typec: tcpci: write ALERT_MASK after devm_request_threaded_irq() Xu Yang
2024-12-16 18:55 ` Francesco Dolcini
2024-12-17 8:54 ` Xu Yang
2024-12-17 9:20 ` Francesco Dolcini [this message]
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=20241217092016.GA25802@francesco-nb \
--to=francesco@dolcini.it \
--cc=andre.draszik@linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=emanuele.ghidoli@toradex.com \
--cc=francesco.dolcini@toradex.com \
--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