[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201003242315.56374.IvDoorn@gmail.com>
Date: Wed, 24 Mar 2010 23:15:56 +0100
From: Ivo van Doorn <ivdoorn@...il.com>
To: Ondrej Zary <linux@...nbow-software.org>
Cc: Gertjan van Wingerde <gwingerde@...il.com>,
rt2x00 Users List <users@...x00.serialmonkey.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rt2500usb: improve powersaving reliability
On Wednesday 24 March 2010, Ondrej Zary wrote:
> 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.
Gertjan has disabled powersaving in rt2500usb until this can be sorted out.
I think for now that would be the way to go. This patch might be needed anyway,
but I'll let GertJan decide on that one.
My only comment about the fix itself is that the REGISTER_BUSY_COUNT should
be updated. rt2500usb is not the only one which suffers from the timeout, so those
might profit from the extra delay as well.
> 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);
>
>
--
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