From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
beld zhang <beldzhang@gmail.com>,
stable@vger.kernel.org, Linux USB <linux-usb@vger.kernel.org>,
Linux Regressions <regressions@lists.linux.dev>,
Takashi Iwai <tiwai@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: 6.1.30: thunderbolt: Clear registers properly when auto clear isn't in use cause call trace after resume
Date: Tue, 30 May 2023 11:03:28 +0300 [thread overview]
Message-ID: <20230530080328.GD45886@black.fi.intel.com> (raw)
In-Reply-To: <e37b2f7f-d204-4204-ce72-e108975c2fe0@amd.com>
On Mon, May 29, 2023 at 11:12:45PM -0500, Mario Limonciello wrote:
> On 5/29/23 06:38, Mika Westerberg wrote:
> > On Sun, May 28, 2023 at 07:55:39AM -0500, Mario Limonciello wrote:
> > > On 5/27/23 18:48, Bagas Sanjaya wrote:
> > > > On Sat, May 27, 2023 at 04:15:51PM -0400, beld zhang wrote:
> > > > > Upgrade to 6.1.30, got crash message after resume, but looks still
> > > > > running normally
> > >
> > > This is specific resuming from s2idle, doesn't happen at boot?
> > >
> > > Does it happen with hot-plugging or hot-unplugging a TBT3 or USB4 dock too?
> >
> > Happens also when device is connected and do
> >
> > # rmmod thunderbolt
> > # modprobe thunderbolt
> >
> > I think it is because nhi_mask_interrupt() does not mask interrupt on
> > Intel now.
> >
> > Can you try the patch below? I'm unable to try myself because my test
> > system has some booting issues at the moment.
> >
> > diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
> > index 4c9f2811d20d..a11650da40f9 100644
> > --- a/drivers/thunderbolt/nhi.c
> > +++ b/drivers/thunderbolt/nhi.c
> > @@ -60,9 +60,12 @@ static int ring_interrupt_index(const struct tb_ring *ring)
> > static void nhi_mask_interrupt(struct tb_nhi *nhi, int mask, int ring)
> > {
> > - if (nhi->quirks & QUIRK_AUTO_CLEAR_INT)
> > - return;
> > - iowrite32(mask, nhi->iobase + REG_RING_INTERRUPT_MASK_CLEAR_BASE + ring);
> > + if (nhi->quirks & QUIRK_AUTO_CLEAR_INT) {
> > + u32 val = ioread32(nhi->iobase + REG_RING_INTERRUPT_BASE + ring);
> > + iowrite32(val & ~mask, nhi->iobase + REG_RING_INTERRUPT_BASE + ring);
> > + } else {
> > + iowrite32(mask, nhi->iobase + REG_RING_INTERRUPT_MASK_CLEAR_BASE + ring);
> > + }
> > }
> > static void nhi_clear_interrupt(struct tb_nhi *nhi, int ring)
>
> Mika, that looks good for the issue, thanks!
>
> You can add:
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
>
> When you submit it.
Thanks, submitted formal patch now here:
https://lore.kernel.org/linux-usb/20230530075555.35239-1-mika.westerberg@linux.intel.com/
beld zhang, can you try it and see if it works on your system? It should
apply on top of thunderbolt.git/fixes [1]. Thanks!
[1] git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
next prev parent reply other threads:[~2023-05-30 8:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 20:15 6.1.30: thunderbolt: Clear registers properly when auto clear isn't in use cause call trace after resume beld zhang
2023-05-27 23:48 ` Bagas Sanjaya
2023-05-28 12:55 ` Mario Limonciello
[not found] ` <CAG7aomVVJyDpKjpZ=k=+9qKY5+13eFjcGPEWZ0T0+NTNfZWDfA@mail.gmail.com>
2023-05-28 18:35 ` Fwd: " beld zhang
2023-05-28 19:02 ` Greg KH
2023-05-29 2:16 ` Bagas Sanjaya
2023-05-29 7:26 ` Greg KH
2023-05-29 2:21 ` Bagas Sanjaya
2023-05-29 3:23 ` beld zhang
2023-05-29 11:38 ` Mika Westerberg
2023-05-29 18:40 ` beld zhang
2023-05-30 5:41 ` Mika Westerberg
2023-05-30 4:12 ` Mario Limonciello
2023-05-30 4:27 ` beld zhang
2023-05-30 9:10 ` Bagas Sanjaya
2023-05-30 8:03 ` Mika Westerberg [this message]
2023-05-30 14:38 ` beld zhang
2023-05-31 7:41 ` Mika Westerberg
2023-08-31 9:20 ` Linux regression tracking #update (Thorsten Leemhuis)
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=20230530080328.GD45886@black.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=bagasdotme@gmail.com \
--cc=beldzhang@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).