From patchwork Tue Mar 20 08:29:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 147756 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 66147B6EF4 for ; Tue, 20 Mar 2012 19:31:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759379Ab2CTIa7 (ORCPT ); Tue, 20 Mar 2012 04:30:59 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:20238 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759321Ab2CTIaf (ORCPT ); Tue, 20 Mar 2012 04:30:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=c_manoha@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1332232235; x=1363768235; h=from:mime-version:content-transfer-encoding:message-id: date:to:cc:subject:in-reply-to:references; z=From:=20Sujith=20Manoharan=20 |MIME-Version:=201.0|Content-Transfer-Encoding:=207bit |Message-ID:=20<20328.16366.166909.255035@gargle.gargle.H OWL>|Date:=20Tue,=2020=20Mar=202012=2013:59:34=20+0530 |To:=20"Justin=20P.=20Mattock"=20|CC:=20Mohammed=20Shafi=20,=20 Linux-wireless=0D=0A=09, =20Felix=20Fietkau=20,=0D=0A=09,=20Linux-netdev=20|Subject:=20Re:=20ath:=20DMA=20failed=20to=20stop =20in=2010=20ms=20AR_CR=3D0x00000024=20AR_DIAG_SW=3D0x020 00020=20DMADBG_7=3D0x00008040|In-Reply-To:=20<4F682555.30 20502@gmail.com>|References:=20<4F576FD5.2050208@gmail.co m>=0D=0A=09=0D=0A=09<4F577D9B.7020402@gmail.co m>=0D=0A=09<4F579A88.6030503@openwrt.org>=0D=0A=09<4F61F5 51.5010608@gmail.com>=0D=0A=09<4F639851.5080500@gmail.com >=0D=0A=09<4F674616.8080103@gmail.com>=0D=0A=09=0D=0A=09<4F674FF5.2060406@gmail.com>=0D=0A=09<4F6751B2. 1030809@openwrt.org>=0D=0A=09<4F681B78.9000207@gmail.com> =0D=0A=09=0D=0A=09<4F68235C.5090701@gmail.com> =0D=0A=09=0D=0A=09<4F682555.3020502@gmail.co m>; bh=B6t4uIaWY6pQOHoUo3SpmOgPZzn4ZcjvhNIAQSox/qU=; b=h9CCjoR0wBKXno0BIcwo+9+JE1c/AuCiP3EmkGyqU52KNrb1ajwZxFv2 jg7K4gdOWUcnVu5VxmN1N6aVlGRyj9Pxhudh5+DTm6tQwhG8NvI+Uz4fc N5Ryf51krNx5YxflAjCWcS2RmHRCAtxFjWfZb5nCkwDwxt97+qPsvTQdl M=; X-IronPort-AV: E=McAfee;i="5400,1158,6654"; a="171677482" Received: from ironmsg02-r.qualcomm.com ([172.30.46.16]) by wolverine02.qualcomm.com with ESMTP; 20 Mar 2012 01:30:17 -0700 X-IronPort-AV: E=Sophos;i="4.73,616,1325491200"; d="scan'208";a="158010845" Received: from nasanexhc05.na.qualcomm.com ([172.30.48.2]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/AES128-SHA; 20 Mar 2012 01:30:17 -0700 Received: from sarge (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.2) with Microsoft SMTP Server (TLS) id 14.1.339.1; Tue, 20 Mar 2012 01:30:16 -0700 From: Sujith Manoharan MIME-Version: 1.0 Message-ID: <20328.16366.166909.255035@gargle.gargle.HOWL> Date: Tue, 20 Mar 2012 13:59:34 +0530 To: "Justin P. Mattock" CC: Mohammed Shafi , Linux-wireless , Felix Fietkau , , Linux-netdev Subject: Re: ath: DMA failed to stop in 10 ms AR_CR=0x00000024 AR_DIAG_SW=0x02000020 DMADBG_7=0x00008040 In-Reply-To: <4F682555.3020502@gmail.com> References: <4F576FD5.2050208@gmail.com> <4F577D9B.7020402@gmail.com> <4F579A88.6030503@openwrt.org> <4F61F551.5010608@gmail.com> <4F639851.5080500@gmail.com> <4F674616.8080103@gmail.com> <4F674FF5.2060406@gmail.com> <4F6751B2.1030809@openwrt.org> <4F681B78.9000207@gmail.com> <4F68235C.5090701@gmail.com> <4F682555.3020502@gmail.com> X-Mailer: VM 8.2.0a under 23.4.1 (x86_64-unknown-linux-gnu) X-Originating-IP: [172.30.48.1] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Justin P. Mattock wrote: > yeah this works: > > eading symbols from > /home/kernel/linux-next/drivers/net/wireless/ath/ath9k/ath9k.o...done. > (gdb) l *(ath_tx_start+0x284) > 0xcad4 is in ath_tx_start (drivers/net/wireless/ath/ath9k/xmit.c:1878). > 1873 ieee80211_is_data_qos(hdr->frame_control)) { > 1874 tidno = ieee80211_get_qos_ctl(hdr)[0] & > 1875 IEEE80211_QOS_CTL_TID_MASK; > 1876 tid = ATH_AN_2_TID(txctl->an, tidno); > 1877 > 1878 WARN_ON(tid->ac->txq != txctl->txq); > 1879 } > 1880 > 1881 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) { > 1882 /* > (gdb) Can you try this patch ? From: Sujith Manoharan Date: Tue, 20 Mar 2012 13:51:26 +0530 Subject: [PATCH] ath9k: Use HW HT capabilites properly The commit "ath9k: Remove aggregation flags" changed how nodes were being initialized. Use the HW HT cap bits to initialize/de-initialize nodes, else we would be accessing an uninitialized entry during a suspend/resume cycle, resulting in a panic. Reported-by: Justin P. Mattock Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 3879485..215eb25 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -640,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta, an->sta = sta; an->vif = vif; - if (sta->ht_cap.ht_supported) { + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { ath_tx_node_init(sc, an); an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR + sta->ht_cap.ampdu_factor); @@ -659,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta) an->sta = NULL; #endif - if (sta->ht_cap.ht_supported) + if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) ath_tx_node_cleanup(sc, an); }