summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/nhi_regs.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-04-24 22:55:54 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2023-05-09 09:39:03 +0300
commitc4af8e3fecd03b0aedcd38145955605cfebe7e3a (patch)
tree6bd7da3a64f693d52d49f5033fd26f181f94aadd /drivers/thunderbolt/nhi_regs.h
parentac9a78681b921877518763ba0e89202254349d1b (diff)
downloadlinux-c4af8e3fecd03b0aedcd38145955605cfebe7e3a.tar.xz
thunderbolt: Clear registers properly when auto clear isn't in use
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>
Diffstat (limited to 'drivers/thunderbolt/nhi_regs.h')
-rw-r--r--drivers/thunderbolt/nhi_regs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/nhi_regs.h b/drivers/thunderbolt/nhi_regs.h
index faef165a919c..6ba295815477 100644
--- a/drivers/thunderbolt/nhi_regs.h
+++ b/drivers/thunderbolt/nhi_regs.h
@@ -93,6 +93,8 @@ struct ring_desc {
#define REG_RING_INTERRUPT_BASE 0x38200
#define RING_INTERRUPT_REG_COUNT(nhi) ((31 + 2 * nhi->hop_count) / 32)
+#define REG_RING_INTERRUPT_MASK_CLEAR_BASE 0x38208
+
#define REG_INT_THROTTLING_RATE 0x38c00
/* Interrupt Vector Allocation */