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: Mon, 29 May 2023 14:38:13 +0300 [thread overview]
Message-ID: <20230529113813.GZ45886@black.fi.intel.com> (raw)
In-Reply-To: <261a70b7-a425-faed-8cd5-7fbf807bdef7@amd.com>
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)
next prev parent reply other threads:[~2023-05-29 11:39 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 [this message]
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
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=20230529113813.GZ45886@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).