Re: 6.1.30: thunderbolt: Clear registers properly when auto clear isn't in use cause call trace after resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



test passed both 6.1.30 and 6.4-rc4
comments at bugzilla.

On Tue, May 30, 2023 at 12:12 AM Mario Limonciello
<mario.limonciello@xxxxxxx> 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@xxxxxxx>
>
> When you submit it.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux