[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201003242307.36363.linux@rainbow-software.org>
Date: Wed, 24 Mar 2010 23:07:34 +0100
From: Ondrej Zary <linux@...nbow-software.org>
To: Gertjan van Wingerde <gwingerde@...il.com>
Cc: rt2x00 Users List <users@...x00.serialmonkey.com>,
Ivo Van Doorn <ivdoorn@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] rt2500usb: improve powersaving reliability
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@...nbow-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists