linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Stefan Lippers-Hollmann <s.L-H@gmx.de>,
	linux-wireless@vger.kernel.org, Tim Blechmann <tim@klingt.org>,
	rjw@sisk.pl, IvDoorn@gmail.com, linville@tuxdriver.com
Subject: Re: regression: rt2561 frequent "Arrived at non-free entry" errors in 	2.6.32
Date: Tue, 08 Dec 2009 22:42:26 +0100	[thread overview]
Message-ID: <4B1EC842.7040407@gmail.com> (raw)
In-Reply-To: <14add3d10912080219u17c65cbemf6d56290a8f12efd@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

On 12/08/09 11:19, Gertjan van Wingerde wrote:
> On Tue, Dec 8, 2009 at 10:57 AM, Andi Kleen <andi@firstfloor.org> wrote:
>>> This patch doesn't seem to change this particular issue, disabling
>>> powersaving however makes rt62pci work again.
>>
>> Yes confirmed here. Haven't seen it in a day or so with disabled power
>> saving.
>>
>> However I haven't tried the patch with power saving enabled.
> 
> OK.
> I think Stefan said that the patch didn't help for this issue.
> 
> However, I've got an other hunch (based on the Ralink driver). Maybe
> we shouldn't go to sleep when still TX entries are present. I'll cook
> up a patch tonight.
> 

OK. Please try again with the attached patch. Basically it disables going
to sleep when there are still unacknowledged frames in the TX queues.
This mirrors the behavior of the Ralink provided drivers.

---
Gertjan.

[-- Attachment #2: 2.6.32-powersave-fix.diff --]
[-- Type: text/plain, Size: 777 bytes --]

diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 687e17d..77b2575 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -947,9 +947,17 @@ static void rt61pci_config_ps(struct rt2x00_dev *rt2x00dev,
 	enum dev_state state =
 	    (libconf->conf->flags & IEEE80211_CONF_PS) ?
 		STATE_SLEEP : STATE_AWAKE;
+	struct data_queue *queue;
 	u32 reg;
 
 	if (state == STATE_SLEEP) {
+		/*
+		 * Don't go to sleep when the TX queues aren't empty.
+		 */
+		tx_queue_for_each(rt2x00dev, queue)
+			if (!rt2x00queue_empty(queue)) {
+				return;
+
 		rt2x00pci_register_read(rt2x00dev, MAC_CSR11, &reg);
 		rt2x00_set_field32(&reg, MAC_CSR11_DELAY_AFTER_TBCN,
 				   rt2x00dev->beacon_int - 10);

  reply	other threads:[~2009-12-08 21:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 23:32 regression: rt2561 frequent "Arrived at non-free entry" errors in 2.6.32 Andi Kleen
2009-12-06 13:40 ` Gertjan van Wingerde
2009-12-06 17:04   ` Andi Kleen
2009-12-06 17:20     ` Johannes Berg
2009-12-06 17:32       ` Andi Kleen
2009-12-07  9:31   ` Tim Blechmann
2009-12-07 21:58     ` Gertjan van Wingerde
2009-12-09 22:59       ` Tim Blechmann
2009-12-09 23:23         ` Gertjan van Wingerde
2009-12-09 23:49           ` Tim Blechmann
2009-12-07 23:06   ` Stefan Lippers-Hollmann
2009-12-08  9:57     ` Andi Kleen
2009-12-08 10:19       ` Gertjan van Wingerde
2009-12-08 21:42         ` Gertjan van Wingerde [this message]
2009-12-08 21:44           ` Johannes Berg
2009-12-08 21:56             ` Gertjan van Wingerde
2009-12-08 22:00               ` Johannes Berg
2009-12-08 22:49                 ` Gertjan van Wingerde
2009-12-08 22:39           ` Stefan Lippers-Hollmann
2009-12-08 22:40             ` Johannes Berg
2009-12-08 22:44               ` Gertjan van Wingerde
2009-12-08 23:53               ` Stefan Lippers-Hollmann
2009-12-09  6:58                 ` Gertjan van Wingerde
2009-12-09  8:24                   ` Johannes Berg
2009-12-10  0:46                   ` Stefan Lippers-Hollmann

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=4B1EC842.7040407@gmail.com \
    --to=gwingerde@gmail.com \
    --cc=IvDoorn@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rjw@sisk.pl \
    --cc=s.L-H@gmx.de \
    --cc=tim@klingt.org \
    /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;
as well as URLs for NNTP newsgroup(s).