linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, Michal Kazior <michal.kazior@tieto.com>
Subject: [PATCHv2 05/13] ath10k: make sure to mask all CE irqs
Date: Fri,  8 Nov 2013 08:01:27 +0100	[thread overview]
Message-ID: <1383894095-27998-6-git-send-email-michal.kazior@tieto.com> (raw)
In-Reply-To: <1383894095-27998-1-git-send-email-michal.kazior@tieto.com>

CE error interrupts were not disabled. This could
lead to invalid memory accesses / memory
corruption.

Also make sure CE watermark interrupts are also
disabled.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/ce.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 2b99bd4..7a49cde 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -243,6 +243,16 @@ static inline void ath10k_ce_error_intr_enable(struct ath10k *ar,
 			   misc_ie_addr | CE_ERROR_MASK);
 }
 
+static inline void ath10k_ce_error_intr_disable(struct ath10k *ar,
+						u32 ce_ctrl_addr)
+{
+	u32 misc_ie_addr = ath10k_pci_read32(ar,
+					     ce_ctrl_addr + MISC_IE_ADDRESS);
+
+	ath10k_pci_write32(ar, ce_ctrl_addr + MISC_IE_ADDRESS,
+			   misc_ie_addr & ~CE_ERROR_MASK);
+}
+
 static inline void ath10k_ce_engine_int_status_clear(struct ath10k *ar,
 						     u32 ce_ctrl_addr,
 						     unsigned int mask)
@@ -794,6 +804,8 @@ void ath10k_ce_disable_interrupts(struct ath10k *ar)
 		u32 ctrl_addr = ath10k_ce_base_address(ce_id);
 
 		ath10k_ce_copy_complete_intr_disable(ar, ctrl_addr);
+		ath10k_ce_error_intr_disable(ar, ctrl_addr);
+		ath10k_ce_watermark_intr_disable(ar, ctrl_addr);
 	}
 	ath10k_pci_sleep(ar);
 }
-- 
1.8.4.rc3


  parent reply	other threads:[~2013-11-08  7:04 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 11:42 [PATCH/RFT 00/12] ath10k: pci fixes 2013-10-30 Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 01/12] ath10k: remove ar_pci->ce_count Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 02/12] ath10k: don't forget to kill fw error tasklet Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 03/12] ath10k: split tasklet killing function Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 04/12] ath10k: rename function to match it's role Michal Kazior
2013-11-06 13:08   ` Kalle Valo
2013-10-30 11:42 ` [PATCH/RFT 05/12] ath10k: make sure to mask all CE irqs Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 06/12] ath10k: fix ath10k_ce_init() failpath Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 07/12] ath10k: remove meaningless check Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 08/12] ath10k: use ath10k_do_pci_wake/sleep Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 09/12] ath10k: propagate ath10k_ce_disable_interrupts() errors Michal Kazior
2013-11-06 12:34   ` Kalle Valo
2013-10-30 11:42 ` [PATCH/RFT 10/12] ath10k: guard against CE corruption from firmware Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 11/12] ath10k: re-arrange PCI init code Michal Kazior
2013-10-30 11:42 ` [PATCH/RFT 12/12] ath10k: add some debug prints Michal Kazior
2013-10-30 17:16   ` Joe Perches
2013-11-06 12:43     ` Kalle Valo
2013-11-06 12:38   ` Kalle Valo
2013-10-30 17:06 ` [PATCH/RFT 00/12] ath10k: pci fixes 2013-10-30 Ben Greear
2013-10-30 23:41 ` Ben Greear
2013-11-08  7:01 ` [PATCHv2 00/13] " Michal Kazior
2013-11-08  7:01   ` [PATCHv2 01/13] ath10k: remove ar_pci->ce_count Michal Kazior
2013-11-08  7:01   ` [PATCHv2 02/13] ath10k: don't forget to kill fw error tasklet Michal Kazior
2013-11-08  7:01   ` [PATCHv2 03/13] ath10k: split tasklet killing function Michal Kazior
2013-11-08  7:01   ` [PATCHv2 04/13] ath10k: rename ath10k_pci_reset_target() Michal Kazior
2013-11-08  7:01   ` Michal Kazior [this message]
2013-11-08  7:01   ` [PATCHv2 06/13] ath10k: fix ath10k_ce_init() failpath Michal Kazior
2013-11-08  7:01   ` [PATCHv2 07/13] ath10k: remove meaningless check Michal Kazior
2013-11-08  7:01   ` [PATCHv2 08/13] ath10k: use ath10k_do_pci_wake/sleep Michal Kazior
2013-11-08  7:01   ` [PATCHv2 09/13] ath10k: propagate ath10k_ce_disable_interrupts() errors Michal Kazior
2013-11-08  7:01   ` [PATCHv2 10/13] ath10k: guard against CE corruption from firmware Michal Kazior
2013-11-08  7:01   ` [PATCHv2 11/13] ath10k: re-arrange PCI init code Michal Kazior
2013-11-08  7:01   ` [PATCHv2 12/13] ath10k: add and fix some PCI prints Michal Kazior
2013-11-08  7:01   ` [PATCHv2 13/13] ath10k: reset device upon stopping/power down Michal Kazior
2013-11-12 18:07   ` [PATCHv2 00/13] ath10k: pci fixes 2013-10-30 Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383894095-27998-6-git-send-email-michal.kazior@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).