Skip to contentSkip to conversation

Bluetooth: btintel_pcie: Clear automask on spurious interrupts

PATCH Superseded Kiran K 3 participants 4 messages Aug 25 Bluetooth drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kiran K

author
#0 lore raw

PATCH 1/1 Bluetooth: btintel_pcie: Clear automask on spurious interrupts

On spurious interrupt where the TX and RX causes are not set, driver was not clearing the auto mask which can block all the interrupts. Driver needs to clear the automask even if no causes are set.

---
 drivers/bluetooth/btintel_pcie.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/btintel_pcie.c +3 -0
index baa621b3fef9..30923eaabed7 100644
@@ -2051,6 +2051,9 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
 
 	if (unlikely(!(intr_fh | intr_hw))) {
 		/* Ignore interrupt, inta == 0 */
+		bt_warn_ratelimited("Bluetooth: btintel_pcie: Received spurious interrupt\n");
+		btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_AUTOMASK_ST,
+				      BIT(entry->entry));
 		return IRQ_NONE;
 	}
 
Signature · 1 line
2.54.0
#1 lore raw

Hi Kiran,

Quoted 4 lines · Kiran K

On spurious interrupt where the TX and RX causes are not set, driver was not clearing the auto mask which can block all the interrupts. Driver needs to clear the automask even if no causes are set.

Aren't we missing the fixes tag here? This looks like a candidate for backport, right?

Quoted 23 lines
---
 drivers/bluetooth/btintel_pcie.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/btintel_pcie.c +3 -1
index baa621b3fef9..30923eaabed7 100644
@@ -2051,6 +2051,9 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)
 
        if (unlikely(!(intr_fh | intr_hw))) {
                /* Ignore interrupt, inta == 0 */
+               bt_warn_ratelimited("Bluetooth: btintel_pcie: Received spurious interrupt\n");
+               btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_MSIX_AUTOMASK_ST,
+                                     BIT(entry->entry));
                return IRQ_NONE;
        }
 
--

2.54.0

Signature · 1 line
Luiz Augusto von Dentz
#3 lore raw
In reply to Kiran K

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1151620

---Test result---

Test Summary:

CheckPatch                    PASS      0.69 seconds
VerifyFixes                   PASS      0.13 seconds
VerifySignedoff               PASS      0.13 seconds
GitLint                       PASS      0.32 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      26.01 seconds
CheckAllWarning               PASS      28.15 seconds
CheckSparse                   PASS      26.88 seconds
BuildKernel32                 PASS      24.61 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      472.27 seconds
IncrementalBuild              PASS      24.34 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found

https://github.com/bluez/bluetooth-next/pull/653

---
Regards,
Linux Bluetooth

author
#2 lore raw
In reply to Luiz Augusto von Dentz

Hi Luiz,

Thanks for the comments.

Quoted 5 lines

Subject: Re: [PATCH v1] Bluetooth: btintel_pcie: Clear automask on spurious interrupts

Hi Kiran,

Quoted 8 lines
Quoted 4 lines · Kiran K

On spurious interrupt where the TX and RX causes are not set, driver was not clearing the auto mask which can block all the interrupts. Driver needs to clear the automask even if no causes are set.

Aren't we missing the fixes tag here? This looks like a candidate for backport, right?

Ack. I will add the fixes tag in v2 version of the patch.

Quoted 23 lines

drivers/bluetooth/btintel_pcie.c static irqreturn_t btintel_pcie_irq_msix_handler(int

Quoted 11 lines
---
 drivers/bluetooth/btintel_pcie.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/bluetooth/btintel_pcie.c +0 -0
index baa621b3fef9..30923eaabed7 100644
@@ -2051,6 +2051,9 @@ static irqreturn_t btintel_pcie_irq_msix_handler(int

irq, void *dev_id)

drivers/bluetooth/btintel_pcie.c static irqreturn_t btintel_pcie_irq_msix_handler(int irq, void *dev_id)

Quoted 4 lines
drivers/bluetooth/btintel_pcie.c +1 -0
        if (unlikely(!(intr_fh | intr_hw))) {
                /* Ignore interrupt, inta == 0 */
+               bt_warn_ratelimited("Bluetooth: btintel_pcie: Received spurious

interrupt\n");

drivers/bluetooth/btintel_pcie.c static irqreturn_t btintel_pcie_irq_msix_handler(int · line 2054

Quoted 1 line
drivers/bluetooth/btintel_pcie.c +1 -0
+               btintel_pcie_wr_reg32(data,

BTINTEL_PCIE_CSR_MSIX_AUTOMASK_ST,

Quoted 4 lines
drivers/bluetooth/btintel_pcie.c +1 -0
+                                     BIT(entry->entry));
                return IRQ_NONE;
        }
 
Quoted 8 lines
Quoted 4 lines
drivers/bluetooth/btintel_pcie.c +0 -1
--

2.54.0

--
Luiz Augusto von Dentz

Regards,
Kiran