From: Felix Fietkau <nbd@openwrt.org>
To: Nick Kossifidis <mickflemm@gmail.com>
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com,
jirislaby@gmail.com
Subject: Re: [PATCH 06/13] ath5k: Use usleep_range where possible
Date: Sun, 20 Nov 2011 10:23:09 +0100 [thread overview]
Message-ID: <4EC8C6FD.1030103@openwrt.org> (raw)
In-Reply-To: <1321775788-12520-7-git-send-email-mickflemm@gmail.com>
On 2011-11-20 8:56 AM, Nick Kossifidis wrote:
> Use usleep_range where possible to reduce busy waits
>
> Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
> ---
> drivers/net/wireless/ath/ath5k/attach.c | 2 +-
> drivers/net/wireless/ath/ath5k/pci.c | 2 +-
> drivers/net/wireless/ath/ath5k/phy.c | 22 +++++++++++-----------
> drivers/net/wireless/ath/ath5k/reset.c | 14 +++++++-------
> 4 files changed, 20 insertions(+), 20 deletions(-)
>
> @@ -1454,7 +1454,7 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah,
> beacon = ath5k_hw_reg_read(ah, AR5K_BEACON_5210);
> ath5k_hw_reg_write(ah, beacon & ~AR5K_BEACON_ENABLE, AR5K_BEACON_5210);
>
> - mdelay(2);
> + usleep_range(2000, 2500);
>
> /*
> * Set the channel (with AGC turned off)
> @@ -1467,7 +1467,7 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah,
> * Activate PHY and wait
> */
> ath5k_hw_reg_write(ah, AR5K_PHY_ACT_ENABLE, AR5K_PHY_ACT);
> - mdelay(1);
> + usleep_range(1000, 1500);
>
> AR5K_REG_DISABLE_BITS(ah, AR5K_PHY_AGC, AR5K_PHY_AGC_DISABLE);
>
Are you sure this is safe? This looks like it's being called from
tasklet context, and I think usleep_range is not allowed there.
- Felix
next prev parent reply other threads:[~2011-11-20 9:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 7:56 [PATCH 00/13] ath5k: A few updates + cleanups + kerneldoc Nick Kossifidis
2011-11-20 7:56 ` [PATCH 01/13] ath5k: Switch from read-and-clear to write-to-clear method when handling PISR/SISR registers Nick Kossifidis
2011-11-20 7:56 ` [PATCH 02/13] ath5k: Maintain PISR snapshot Nick Kossifidis
2011-11-20 22:43 ` Adrian Chadd
2011-11-21 3:44 ` Nick Kossifidis
2011-11-20 7:56 ` [PATCH 03/13] ath5k: Add TXNOFRM to INT_TX_ALL Nick Kossifidis
2011-11-20 7:56 ` [PATCH 04/13] ath5k: Cleanups v1 Nick Kossifidis
2011-11-20 7:56 ` [PATCH 05/13] ath5k: Calibration re-work Nick Kossifidis
2011-11-20 7:56 ` [PATCH 06/13] ath5k: Use usleep_range where possible Nick Kossifidis
2011-11-20 9:23 ` Felix Fietkau [this message]
2011-11-20 15:43 ` Nick Kossifidis
2011-11-20 16:01 ` Jiri Slaby
2011-11-20 16:10 ` Nick Kossifidis
2011-11-20 7:56 ` [PATCH 07/13] ath5k: Cleanups v2 + add kerneldoc on all hw functions Nick Kossifidis
2011-11-20 7:56 ` [PATCH 08/13] ath5k: We always do full calibration on AR5210 Nick Kossifidis
2011-11-20 7:56 ` [PATCH 09/13] ath5k: Add a module parameter to disable hw rf kill switch Nick Kossifidis
2011-11-20 7:56 ` [PATCH 10/13] ath5k: MRR support and 2GHz radio override belong in ah_capabilities Nick Kossifidis
2011-11-20 7:56 ` [PATCH 11/13] ath5k: ath5k_ani_period_restart only touches struct ath5k_ani_state Nick Kossifidis
2011-11-20 7:56 ` [PATCH 12/13] ath5k: Renumber hw queue ids Nick Kossifidis
2011-11-20 7:56 ` [PATCH 13/13] ath5k: Optimize ath5k_cw_validate Nick Kossifidis
2011-11-20 15:44 ` Bob Copeland
2011-11-20 16:15 ` 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=4EC8C6FD.1030103@openwrt.org \
--to=nbd@openwrt.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=me@bobcopeland.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