From: Ondrej Zary <linux@rainbow-software.org>
To: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: rt2x00 Users List <users@rt2x00.serialmonkey.com>,
Ivo Van Doorn <ivdoorn@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] rt2500usb: improve powersaving reliability
Date: Wed, 24 Mar 2010 23:07:34 +0100 [thread overview]
Message-ID: <201003242307.36363.linux@rainbow-software.org> (raw)
In-Reply-To: <4BA8E11A.2020300@gmail.com>
According to my debugging, retrying 5 times (REGISTER_BUSY_COUNT) does not
provide enough time for the device to enter the required state. Sometimes,
the device needs 12 to 15 retries. Increase it to 20 to be sure.
This improves powersaving reliability but one problem still remains: power
state change sometimes fails completely - the bpp_state and rf_state get
stuck and cannot be changed anymore.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
--- linux-2.6.34-rc2-orig/drivers/net/wireless/rt2x00/rt2500usb.c 2010-03-20 02:17:57.000000000 +0100
+++ linux-2.6.34-rc2/drivers/net/wireless/rt2x00/rt2500usb.c 2010-03-24 22:55:53.000000000 +0100
@@ -968,7 +968,7 @@ static int rt2500usb_set_state(struct rt
* We must wait until the register indicates that the
* device has entered the correct state.
*/
- for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
+ for (i = 0; i < 20; i++) {
rt2500usb_register_read(rt2x00dev, MAC_CSR17, ®2);
bbp_state = rt2x00_get_field16(reg2, MAC_CSR17_BBP_CURR_STATE);
rf_state = rt2x00_get_field16(reg2, MAC_CSR17_RF_CURR_STATE);
--
Ondrej Zary
next prev parent reply other threads:[~2010-03-24 22:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 15:01 [PATCH RFC] rt2500usb: disable broken HW encryption by default Ondrej Zary
2010-03-22 15:10 ` [rt2x00-users] " Ivo Van Doorn
2010-03-22 15:30 ` Ondrej Zary
2010-03-22 15:40 ` Ivo Van Doorn
2010-03-23 9:27 ` Ondrej Zary
2010-03-23 9:36 ` Ivo Van Doorn
2010-03-23 15:09 ` Ondrej Zary
2010-03-23 15:15 ` Ivo Van Doorn
2010-03-24 13:12 ` Ondrej Zary
2010-03-24 13:24 ` Ivo Van Doorn
2010-03-24 14:52 ` Ondrej Zary
2010-03-26 11:05 ` Ondrej Zary
2010-03-23 15:41 ` Gertjan van Wingerde
2010-03-24 13:10 ` Ondrej Zary
2010-03-24 22:07 ` Ondrej Zary [this message]
2010-03-24 22:15 ` [PATCH] rt2500usb: improve powersaving reliability Ivo van Doorn
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=201003242307.36363.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=gwingerde@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=users@rt2x00.serialmonkey.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