summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/601-rt2x00-fix-hang-on-ifdown.patch
blob: 2f9b5d6f79fac3398420c14ec1c88ae6d091ab4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 27ed5ec6924c17b76d65b697a162bafee7bd8e4e Mon Sep 17 00:00:00 2001
From: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Mon, 21 Jun 2010 10:03:05 +0200
Subject: [PATCH] rt2x00: fix rt2800pci hang on ifdown

rt2800pci hangs the system on rt305x SoC devices on ifdown. Work around
this issue by disabling TX DMA prior to resetting the TX queue indices.

This patch is not suitable for upstream inclusion but is just meant as
a workaround until a proper solution is implemented.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
 drivers/net/wireless/rt2x00/rt2800pci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -585,6 +585,10 @@ static void rt2800pci_kill_tx_queue(stru
 		return;
 	}
 
+	rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, &reg);
+	rt2x00_set_field32(&reg, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0);
+	rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
+
 	rt2800_register_read(rt2x00dev, WPDMA_RST_IDX, &reg);
 	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX0, (queue->qid == QID_AC_BE));
 	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX1, (queue->qid == QID_AC_BK));