From patchwork Tue Oct 2 10:33:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1536701 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 397233FCFC for ; Tue, 2 Oct 2012 10:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381Ab2JBKdh (ORCPT ); Tue, 2 Oct 2012 06:33:37 -0400 Received: from narfation.org ([79.140.41.39]:34847 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568Ab2JBKdh (ORCPT ); Tue, 2 Oct 2012 06:33:37 -0400 Received: from sven-desktop.home.narfation.org (drsd-4d05e47f.pool.mediaWays.net [77.5.228.127]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 435CC94062; Tue, 2 Oct 2012 12:33:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1349174015; bh=CZQjO1dFgMXyZs5Kje6HNAZGJ7MKtgiCyxcYZMd5Rx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RKcRaAT7KL0CXeV87bGGqZJqUm3zQPKAIeKJmHMXQFr5/I0Wx5s6A2LnT0obW4QzI rrp7Laqrjs749BIuzCOVmki1yMdebN8iBOyXJxQLyHq0Pcpgo2qDe45Gcfvw2LqSuk QTAxP60YsAdRxHIfXDIgbX3i++VRvpTf3CP4sU3I= From: Sven Eckelmann To: linux-wireless@vger.kernel.org Cc: ath9k-devel@lists.ath9k.org, linville@tuxdriver.com, mcgrof@qca.qualcomm.com, lindner_marek@yahoo.de, Sven Eckelmann Subject: [PATCHv2] ath9k_hw: Handle AR_INTR_SYNC_HOST1_FATAL on AR9003 Date: Tue, 2 Oct 2012 12:33:29 +0200 Message-Id: <1349174009-16496-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1348756862-8788-1-git-send-email-sven@narfation.org> References: <1348756862-8788-1-git-send-email-sven@narfation.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Interrupts with the sync_cause AR_INTR_SYNC_HOST1_FATAL has to be handled using a chip reset. Otherwise a interrupt storm with unhandled interrupts will cause a hang or crash of the machine. Signed-off-by: Sven Eckelmann --- I was informed that AR_INTR_SYNC_HOST1_PERR should not be handled this way because it can create system freezes after an adhoc interface was created. I really need some Atheros developer who can check the documentation to verify the interpretation of these flags. Otherwise this is just guessing and may lead to even bigger problems. drivers/net/wireless/ath/ath9k/ar9003_mac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index d5b2e0e..6031bdf 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -311,6 +311,11 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) if (sync_cause) { ath9k_debug_sync_cause(common, sync_cause); + if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) { + ath_dbg(common, ANY, "received PCI FATAL interrupt\n"); + *masked |= ATH9K_INT_FATAL; + } + if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) { REG_WRITE(ah, AR_RC, AR_RC_HOSTIF); REG_WRITE(ah, AR_RC, 0);