]> git.itanic.dy.fi Git - linux-stable/commit
thunderbolt: Clear registers properly when auto clear isn't in use
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 24 Apr 2023 19:55:54 +0000 (14:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:30:22 +0000 (17:30 +0100)
commit27b98a67a8ab21de9ae0f6a9553af9aa6aa2b43a
treece91ccdbee363b7808e4bd44792c56b3cf0a43cd
parenta599be1bb34690dffd8dd1a4e555bf9efc68bb92
thunderbolt: Clear registers properly when auto clear isn't in use

commit c4af8e3fecd03b0aedcd38145955605cfebe7e3a upstream.

When `QUIRK_AUTO_CLEAR_INT` isn't set, interrupt masking should be
cleared by writing to Interrupt Mask Clear (IMR) and interrupt
status should be cleared properly at shutdown/init.

This fixes an error where interrupts are left enabled during resume
from hibernation with `CONFIG_USB4=y`.

Fixes: 468c49f44759 ("thunderbolt: Disable interrupt auto clear for rings")
Cc: stable@vger.kernel.org # v6.3
Reported-by: Takashi Iwai <tiwai@suse.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217343
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/nhi.c
drivers/thunderbolt/nhi_regs.h