linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Sujith Manoharan <c_manoha@qca.qualcomm.com>,
	linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 09/22] ath9k: Handle fatal interrupts properly
Date: Tue, 29 May 2012 14:43:38 +0200	[thread overview]
Message-ID: <4FC4C47A.50006@openwrt.org> (raw)
In-Reply-To: <1338294968.4342.32.camel@jlt3.sipsolutions.net>

On 2012-05-29 2:36 PM, Johannes Berg wrote:
> On Tue, 2012-05-29 at 14:29 +0200, Felix Fietkau wrote:
>> On 2012-05-24 6:02 AM, Sujith Manoharan wrote:
>> > When a fatal interrupt is received or it is detected that the baseband
>> > has hung, the chip has to be reset immediately.  Otherwise, we end up
>> > processing spurious interrupts. Ensure that we bail out properly in
>> > the ISR when the reset work hasn't completed yet.
>> > 
>> > Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
>> Wouldn't it be much easier to just use a bool variable instead of the
>> combination of lock+flag? A simple variable assignment is atomic...
> 
> Is that guaranteed for bool variables?
Hm, good point. Maybe use u32 then. Either way, the lock in this patch
does almost nothing to protect against race conditions, since it doesn't
apply to other places in the code that change sc->sc_flags.
Maybe we should change that entire thing to just use set_bit/test_bit
instead.

- Felix

  reply	other threads:[~2012-05-29 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  4:02 [PATCH v2 09/22] ath9k: Handle fatal interrupts properly Sujith Manoharan
2012-05-29 12:29 ` Felix Fietkau
2012-05-29 12:36   ` Johannes Berg
2012-05-29 12:43     ` Felix Fietkau [this message]
2012-05-29 12:50       ` Sujith Manoharan
2012-06-02 11:53       ` Sujith Manoharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FC4C47A.50006@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).