Skip to contentSkip to conversation

ath5k: Fix reset and interrupts for AHB type of devices.

PATCH In review Wojciech Dubowik 1 participant 1 message Dec 2, 2010 1 message not in the archive Atheros ATH5K wireless driver

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 32371853.1301291281887500.JavaMail.wlan@CHBU500181

#1 lore raw

PATCH v7 9/9 ath5k: Fix reset and interrupts for AHB type of devices.

From: Felix Fietkau <[email protected]>

On WiSoc we cannot access mac register before it is resetted. It will crash hardware otherwise.

---
 drivers/net/wireless/ath/ath5k/base.c  |    7 ++-
 drivers/net/wireless/ath/ath5k/reset.c |  103 ++++++++++++++++++++++++++++----
 2 files changed, 97 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +6 -1
index 685de2d..0a7071a 100644
@@ -2148,7 +2148,8 @@ ath5k_intr(int irq, void *dev_id)
 	unsigned int counter = 1000;
 
 	if (unlikely(test_bit(ATH_STAT_INVALID, sc->status) ||
-				!ath5k_hw_is_intr_pending(ah)))
+		((ath5k_get_bus_type(ah) != ATH_AHB) &&
+				!ath5k_hw_is_intr_pending(ah))))
 		return IRQ_NONE;
 
 	do {
@@ -2214,6 +2215,10 @@ ath5k_intr(int irq, void *dev_id)
 				tasklet_schedule(&sc->rf_kill.toggleq);
 
 		}
+
+		if (ath5k_get_bus_type(ah) == ATH_AHB)
+			break;
+
 	} while (ath5k_hw_is_intr_pending(ah) && --counter > 0);
 
 	if (unlikely(!counter))
drivers/net/wireless/ath/ath5k/reset.c +91 -12

163 lines not on this page · raw message

Signature · 1 line
1.7.1