mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
94 lines
3.0 KiB
Diff
94 lines
3.0 KiB
Diff
From 01279bcd01d965b6526d575e036841778d8e3c4e Mon Sep 17 00:00:00 2001
|
|
From: Carl Huang <cjhuang@codeaurora.org>
|
|
Date: Fri, 19 Nov 2021 15:36:26 +0200
|
|
Subject: [PATCH 105/120] ath11k: add CE and ext IRQ flag to indicate
|
|
irq_handler
|
|
|
|
This change adds two flags to indicate whether IRQ handler for CE
|
|
and DP can be called. This is because in one MSI vector case,
|
|
interrupt is not disabled in hif_stop and hif_irq_disable. Otherwise,
|
|
MHI interrupt is disabled too.
|
|
|
|
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
|
|
|
|
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
|
|
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
|
Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
|
|
Link: https://lore.kernel.org/r/20211026041646.5060-1-bqiang@codeaurora.org
|
|
---
|
|
drivers/net/wireless/ath/ath11k/core.h | 2 ++
|
|
drivers/net/wireless/ath/ath11k/pci.c | 16 ++++++++++++++++
|
|
2 files changed, 18 insertions(+)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
@@ -199,6 +199,8 @@ enum ath11k_dev_flags {
|
|
ATH11K_FLAG_REGISTERED,
|
|
ATH11K_FLAG_QMI_FAIL,
|
|
ATH11K_FLAG_HTC_SUSPEND_COMPLETE,
|
|
+ ATH11K_FLAG_CE_IRQ_ENABLED,
|
|
+ ATH11K_FLAG_EXT_IRQ_ENABLED,
|
|
};
|
|
|
|
enum ath11k_monitor_flags {
|
|
--- a/drivers/net/wireless/ath/ath11k/pci.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/pci.c
|
|
@@ -578,6 +578,8 @@ static void ath11k_pci_ce_irqs_disable(s
|
|
{
|
|
int i;
|
|
|
|
+ clear_bit(ATH11K_FLAG_CE_IRQ_ENABLED, &ab->dev_flags);
|
|
+
|
|
for (i = 0; i < ab->hw_params.ce_count; i++) {
|
|
if (ath11k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
|
|
continue;
|
|
@@ -611,6 +613,10 @@ static void ath11k_pci_ce_tasklet(struct
|
|
static irqreturn_t ath11k_pci_ce_interrupt_handler(int irq, void *arg)
|
|
{
|
|
struct ath11k_ce_pipe *ce_pipe = arg;
|
|
+ struct ath11k_base *ab = ce_pipe->ab;
|
|
+
|
|
+ if (!test_bit(ATH11K_FLAG_CE_IRQ_ENABLED, &ab->dev_flags))
|
|
+ return IRQ_HANDLED;
|
|
|
|
/* last interrupt received for this CE */
|
|
ce_pipe->timestamp = jiffies;
|
|
@@ -633,6 +639,8 @@ static void __ath11k_pci_ext_irq_disable
|
|
{
|
|
int i;
|
|
|
|
+ clear_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &sc->dev_flags);
|
|
+
|
|
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
|
|
struct ath11k_ext_irq_grp *irq_grp = &sc->ext_irq_grp[i];
|
|
|
|
@@ -655,6 +663,8 @@ static void ath11k_pci_ext_irq_enable(st
|
|
{
|
|
int i;
|
|
|
|
+ set_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags);
|
|
+
|
|
for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) {
|
|
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
|
|
|
|
@@ -706,6 +716,10 @@ static int ath11k_pci_ext_grp_napi_poll(
|
|
static irqreturn_t ath11k_pci_ext_interrupt_handler(int irq, void *arg)
|
|
{
|
|
struct ath11k_ext_irq_grp *irq_grp = arg;
|
|
+ struct ath11k_base *ab = irq_grp->ab;
|
|
+
|
|
+ if (!test_bit(ATH11K_FLAG_EXT_IRQ_ENABLED, &ab->dev_flags))
|
|
+ return IRQ_HANDLED;
|
|
|
|
ath11k_dbg(irq_grp->ab, ATH11K_DBG_PCI, "ext irq:%d\n", irq);
|
|
|
|
@@ -852,6 +866,8 @@ static void ath11k_pci_ce_irqs_enable(st
|
|
{
|
|
int i;
|
|
|
|
+ set_bit(ATH11K_FLAG_CE_IRQ_ENABLED, &ab->dev_flags);
|
|
+
|
|
for (i = 0; i < ab->hw_params.ce_count; i++) {
|
|
if (ath11k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
|
|
continue;
|