public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Ondrej Zary <linux@rainbow-software.org>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>,
	rt2x00 Users List <users@rt2x00.serialmonkey.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rt2500usb: improve powersaving reliability
Date: Wed, 24 Mar 2010 23:15:56 +0100	[thread overview]
Message-ID: <201003242315.56374.IvDoorn@gmail.com> (raw)
In-Reply-To: <201003242307.36363.linux@rainbow-software.org>

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@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, &reg2);
>  		bbp_state = rt2x00_get_field16(reg2, MAC_CSR17_BBP_CURR_STATE);
>  		rf_state = rt2x00_get_field16(reg2, MAC_CSR17_RF_CURR_STATE);
> 
> 



      reply	other threads:[~2010-03-24 22:16 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               ` [PATCH] rt2500usb: improve powersaving reliability Ondrej Zary
2010-03-24 22:15                 ` Ivo van Doorn [this message]

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=201003242315.56374.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=gwingerde@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rainbow-software.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