All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Chadd <adrian.chadd@gmail.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] interrupt handling (ar9002/ar9003): why is BCNMISC checked before ISR_RAC ?
Date: Mon, 12 Sep 2011 12:26:01 +0800	[thread overview]
Message-ID: <CAJ-VmokKS7tBFXKZdxiwn3c-CGs9iUUTLzkDm7ZjKvfe2iGCsg@mail.gmail.com> (raw)

Hi all,

I have a few questions about the interrupt handling in ath9k (since
FreeBSD's interrupt code is much the same.)

Why is it that the BCNMISC flag in AR_ISR is checked in the AR_ISR
read, -before- the AR_ISR_RAC register is read?
Isn't it possible that there's a subtle race condition here, where
reading AR_ISR for the BCNMISC flag will return 0, or some bits in
AR_ISR_S2 are 0, but the condition that triggers them happens between
the reads there, and the subsequent read from AR_ISR_RAC? (which then
atomically copies them to _S registers and 0's the status registers?)

Second question: why is there ATH9K_HW_CAP_RAC_SUPPORTED ?

It's set for the AR9300_20 and later. The AR9002 routines don't even
use that bit - they always use AR_ISR_RAC and the _S shadow registers.
Is it something that doesn't exist for AR9300 1.0 ? (is that even
public?)

Thanks,


Adrian

             reply	other threads:[~2011-09-12  4:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-12  4:26 Adrian Chadd [this message]
2011-09-12  9:03 ` [ath9k-devel] 回复: interrupt handling (ar9002/ar9003): why is BCNMISC checked before ISR_RAC ? 李建真

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=CAJ-VmokKS7tBFXKZdxiwn3c-CGs9iUUTLzkDm7ZjKvfe2iGCsg@mail.gmail.com \
    --to=adrian.chadd@gmail.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.