linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
	linville@tuxdriver.com, jirislaby@gmail.com, mcgrof@gmail.com,
	Nick Kossifidis <mickflemm@gmail.com>
Subject: Re: [PATCH 6/12] ath5k: Reorder calibration calls during reset and update hw_set_power
Date: Tue, 22 Jul 2008 16:52:31 +0200	[thread overview]
Message-ID: <4885F42F.9050503@gmail.com> (raw)
In-Reply-To: <20080720034126.GF7440@makis>

On 07/20/2008 05:41 AM, Nick Kossifidis wrote:
>  * Update ath5k_hw_reset and add some more documentation about PHY calibration
>  * Fix ath5k_hw_set_power to use AR5K_SLEEP_CTL_SLE_ALLOW for Network sleep
>  * Preserve sleep duration field while setting AR5K_SLEEP_CTL and reduce delays & checks for register's status (got this from decompiling & dumps, it works for me but it needs testing)
> 
>  Changes-licensed-under: ISC
>  Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
> 
> ---
> diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
> index cab1a8a..4fb048c 100644
> --- a/drivers/net/wireless/ath5k/hw.c
> +++ b/drivers/net/wireless/ath5k/hw.c
[...]
> @@ -1461,6 +1496,7 @@ int ath5k_hw_stop_tx_dma(struct ath5k_hw *ah, unsigned int queue)
>  
>  		/* Stop queue */
>  		ath5k_hw_reg_write(ah, tx_queue, AR5K_CR);
> +		ath5k_hw_reg_read(ah, AR5K_CR);

This one was in my patch already.

>  	} else {
>  		/*
>  		 * Schedule TX disable and wait until queue is empty
> @@ -1705,6 +1741,7 @@ enum ath5k_int ath5k_hw_set_intr(struct ath5k_hw *ah, enum ath5k_int new_mask)

Adding from the code:
         /*
          * Disable card interrupts to prevent any race conditions
>  	 * (they will be re-enabled afterwards).
>  	 */
>  	ath5k_hw_reg_write(ah, AR5K_IER_DISABLE, AR5K_IER);
> +	ath5k_hw_reg_read(ah, AR5K_IER);

Is this first flush needed? Writes cannot be reordered, they are just 
asynchronous and flushed below. What race is this against? The interrupt might 
be processed (or pending) at this moment on other processor anyway.

>  	old_mask = ah->ah_imr;
>  
> @@ -1737,6 +1774,7 @@ enum ath5k_int ath5k_hw_set_intr(struct ath5k_hw *ah, enum ath5k_int new_mask)
>  
>  	/* ..re-enable interrupts */
>  	ath5k_hw_reg_write(ah, AR5K_IER_ENABLE, AR5K_IER);
> +	ath5k_hw_reg_read(ah, AR5K_IER);

This was fixed too.

  reply	other threads:[~2008-07-22 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20  3:41 [PATCH 6/12] ath5k: Reorder calibration calls during reset and update hw_set_power Nick Kossifidis
2008-07-22 14:52 ` Jiri Slaby [this message]
2008-07-28 13:00   ` Nick Kossifidis

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=4885F42F.9050503@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --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).