diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-09 12:05:44 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-09 12:06:52 +0300 |
commit | ef65afa0740e28cb0951fa9012cb78765f883a4a (patch) | |
tree | c10d4bf06571f203e9fe0eb8221d5af8ec39e341 /drivers/thunderbolt/nhi.c | |
parent | 033c2d8ab2835a7f13e1a9c6813b412935e77140 (diff) | |
parent | 9f9666e65359d5047089aef97ac87c50f624ecb0 (diff) | |
download | linux-ef65afa0740e28cb0951fa9012cb78765f883a4a.tar.xz |
Merge branch 'thunderbolt/fixes' into thunderbolt/next
We need Thunderbolt/USB4 fixes here as well.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/nhi.c')
-rw-r--r-- | drivers/thunderbolt/nhi.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index 565892a2cdb9..a979f47109e3 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -56,9 +56,14 @@ 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; + + 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) |