Skip to contentSkip to conversation

carl9170: fix hung workqueue

PATCH In review Christian Lamparter 2 participants 3 messages Sep 27, 2010 – Oct 1, 2010 CARL9170 Linux community wireless driver

lore
Share & tools
lore

Christian Lamparter

author maintainer
#0 lore raw

PATCH 1/1 carl9170: fix hung workqueue

The patch "mac80211: wait for scan work complete before restarting hw", broke carl9170's restart path.

Previously it was possible to call ieee80211_restart_hw from mac80211's internal workqueue. Now though it hangs because of the flush_workqueue in the procedure.

---

drivers/net/wireless/ath/carl9170/main.c +1 -1
index 84bd38e..d9d3e9c 100644
@@ -515,7 +515,7 @@ void carl9170_restart(struct ar9170 *ar, const enum carl9170_restart_reasons r)
 		return;
 
 	if (IS_ACCEPTING_CMD(ar) && !ar->needs_full_reset)
-		ieee80211_queue_work(ar->hw, &ar->restart_work);
+		schedule_work(&ar->restart_work);
 	else
 		carl9170_usb_reset(ar);
 
#1 lore raw
Quoted 6 lines · Christian Lamparter

The patch "mac80211: wait for scan work complete before restarting hw", broke carl9170's restart path.

Previously it was possible to call ieee80211_restart_hw from mac80211's internal workqueue. Now though it hangs because of the flush_workqueue in the procedure.

I thought I asked somebody to move that. It's expected that you are allowed to call it -- the flush and scan cancel code there needs to be moved into the _work_, out of the restart_hw() function.

johannes

author maintainer
#2 lore raw
Quoted 4 lines · On Tuesday 28 September 2010 09:25:47 Johannes Berg wrote:
Quoted 3 lines · Christian Lamparter

The patch "mac80211: wait for scan work complete before restarting hw", broke carl9170's restart path.

Quoted 8 lines
Quoted 3 lines

Previously it was possible to call ieee80211_restart_hw from mac80211's internal workqueue. Now though it hangs because of the flush_workqueue in the procedure.

I thought I asked somebody to move that. It's expected that you are allowed to call it -- the flush and scan cancel code there needs to be moved into the _work_, out of the restart_hw() function.

John,

you can drop this patch and add Stanislaw's patch - series:
"[PATCH 1/6] mac80211: perform scan cancel in hw reset work" instead.

Regards,
Chr