From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail30s.wh2.ocn.ne.jp ([125.206.180.198]:5610 "HELO mail30s.wh2.ocn.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755146Ab0FNBvj (ORCPT ); Sun, 13 Jun 2010 21:51:39 -0400 Received: from vs3009.wh2.ocn.ne.jp (125.206.180.237) by mail30s.wh2.ocn.ne.jp (RS ver 1.0.95vs) with SMTP id 0-057846296 for ; Mon, 14 Jun 2010 10:51:37 +0900 (JST) From: Bruno Randolf To: Bob Copeland Subject: Re: [ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting Date: Mon, 14 Jun 2010 10:50:59 +0900 Cc: Johannes Berg , ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, linville@tuxdriver.com References: <20100611101221.26538.46913.stgit@tt-desk> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Message-Id: <201006141050.59607.br1@einfach.org> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Friday 11 June 2010 23:38:15 Bob Copeland wrote: > On Fri, Jun 11, 2010 at 10:21 AM, Bob Copeland wrote: > > On Fri, Jun 11, 2010 at 6:41 AM, Johannes Berg > > > > wrote: > >> I have no idea how long a reset can take, but this means that all these > >> tasklets will spin while your reset is running if they were scheduled. > > > > It looks to me like tasklet_action() will bail out when the tasklet has a > > positive t->count (which disable elevates) rather than spin. What did I > > miss? > > As Johannes pointed out on irc, I missed that it re-raises the softirq. > doh! well, what else can we do? we have to make sure the tasklets don't run concurrently to a reset to keep rx and tx buffers consistent. we disable interrupts right after disabling the tasklets, so they should not be scheduled again, right? actually, we should disable interrupts first, and then disable tasklets... but then it should be safe, no? bruno