From: Benoit PAPILLAULT <benoit.papillault@free.fr>
To: Derek Smithies <derek@indranet.co.nz>
Cc: jirislaby@gmail.com, mickflemm@gmail.com,
ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: Re: [ath5k-devel] [PATCH] ath5k: Fix 64 bits TSF reading.
Date: Mon, 01 Mar 2010 07:47:10 +0100 [thread overview]
Message-ID: <4B8B62EE.7000802@free.fr> (raw)
In-Reply-To: <alpine.DEB.2.00.1003011457470.20218@kauri.acheron.indranet.co.nz>
Derek Smithies a écrit :
>
> Hi,
> No, canot support this.
>
> What happens if there is an interrupt immediately after the first two
> reads - before the test on tsf_lower? - and thisinterrupt lasts longer
> than 100us ? Most often, this is ok - until the interrupt happens at
> the wrong time.
>
> OR, there is a TSF merge event after the tsf_upper has been read, but
> before the tsf_lower has been read? The tsf merge (which is done by
> the hardware), adjusted both the high and low registers.
>
> Derek.
Hi Derek,
You are indeed right. This was a first step, but like you mentioned, it
does not handle every cases, so let's forget it.
Regards,
Benoit
> On Sun, 28 Feb 2010, Benoit Papillault wrote:
>
>> +
>> + tsf_upper = ath5k_hw_reg_read(ah, AR5K_TSF_U32);
>> + tsf_lower = ath5k_hw_reg_read(ah, AR5K_TSF_L32);
>> +
>> + if (tsf_lower < 100)
>> + tsf_upper = ath5k_hw_reg_read(ah, AR5K_TSF_U32);
>> +
>> ATH5K_TRACE(ah->ah_sc);
>>
>> - return ath5k_hw_reg_read(ah, AR5K_TSF_L32) | (tsf << 32);
>> + return (((u64)tsf_upper << 32) | tsf_lower);
>> }
>>
>> /**
>>
>
next prev parent reply other threads:[~2010-03-01 6:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4B8AE8F1.40006@free.fr>
2010-02-28 22:08 ` [PATCH] ath5k: Fix 64 bits TSF reading Benoit Papillault
2010-03-01 2:02 ` [ath5k-devel] " Derek Smithies
2010-03-01 6:47 ` Benoit PAPILLAULT [this message]
2010-03-08 8:17 ` Johannes Berg
2010-03-08 21:44 ` Benoit PAPILLAULT
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=4B8B62EE.7000802@free.fr \
--to=benoit.papillault@free.fr \
--cc=ath5k-devel@lists.ath5k.org \
--cc=derek@indranet.co.nz \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mickflemm@gmail.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).