mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	debian-kernel@lists.debian.org,
	Giacomo Mulas <gmulas@ca.astro.it>,
	Broadcom Linux <bcm43xx-dev@lists.berlios.de>,
	linux-kernel@vger.kernel.org
Subject: Re: b43 locks the machine when resuming after suspend to disk
Date: Wed, 02 Jul 2008 17:32:38 -0500	[thread overview]
Message-ID: <486C0206.7060606@lwfinger.net> (raw)
In-Reply-To: <1215035761.13270.10.camel@johannes.berg>

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

Johannes Berg wrote:
>>> I think you need the appended patch, but it only applies to linux-next.
>> A different version has been merged into what will become 2.6.26. I'll
>> see what we can do about stable.
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ef3a62d272f033989e83eb1f26505f93f93e3e69;hp=6d1a3fb567a728d31474636e167c324702a0c38b
> 
> Anybody have a stable tree around to see if that applies? I think it
> should.

It didn't, but this version will. It has been compile tested only.

Larry

===========================


Index: linux-2.6/net/mac80211/tx.c
===================================================================
--- linux-2.6.orig/net/mac80211/tx.c
+++ linux-2.6/net/mac80211/tx.c
@@ -1090,7 +1090,7 @@ static int ieee80211_tx(struct net_devic
  	ieee80211_tx_handler *handler;
  	struct ieee80211_txrx_data tx;
  	ieee80211_txrx_result res = TXRX_DROP, res_prepare;
-	int ret, i;
+	int ret, i, retries = 0;

  	WARN_ON(__ieee80211_queue_pending(local, control->queue));

@@ -1181,6 +1181,13 @@ retry:
  		if (!__ieee80211_queue_stopped(local, control->queue)) {
  			clear_bit(IEEE80211_LINK_STATE_PENDING,
  				  &local->state[control->queue]);
+			retries++;
+			/*
+			 * Driver bug, it's rejecting packets but
+			 * not stopping queues.
+			 */
+			if (WARN_ON_ONCE(retries > 5))
+				goto drop;
  			goto retry;
  		}
  		memcpy(&store->control, control,


[-- Attachment #2: mac80211_tx_patch --]
[-- Type: text/plain, Size: 847 bytes --]

Index: linux-2.6/net/mac80211/tx.c
===================================================================
--- linux-2.6.orig/net/mac80211/tx.c
+++ linux-2.6/net/mac80211/tx.c
@@ -1090,7 +1090,7 @@ static int ieee80211_tx(struct net_devic
 	ieee80211_tx_handler *handler;
 	struct ieee80211_txrx_data tx;
 	ieee80211_txrx_result res = TXRX_DROP, res_prepare;
-	int ret, i;
+	int ret, i, retries = 0;
 
 	WARN_ON(__ieee80211_queue_pending(local, control->queue));
 
@@ -1181,6 +1181,13 @@ retry:
 		if (!__ieee80211_queue_stopped(local, control->queue)) {
 			clear_bit(IEEE80211_LINK_STATE_PENDING,
 				  &local->state[control->queue]);
+			retries++;
+			/*
+			 * Driver bug, it's rejecting packets but
+			 * not stopping queues.
+			 */
+			if (WARN_ON_ONCE(retries > 5))
+				goto drop;
 			goto retry;
 		}
 		memcpy(&store->control, control,


  reply	other threads:[~2008-07-02 22:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 20:51 Giacomo Mulas
2008-07-02 21:40 ` Rafael J. Wysocki
2008-07-02 21:46   ` Johannes Berg
2008-07-02 21:56     ` Johannes Berg
2008-07-02 22:32       ` Larry Finger [this message]
2008-07-02 22:37         ` Johannes Berg
2008-07-02 22:56   ` Johannes Berg
2008-07-02 23:08     ` Rafael J. Wysocki
2008-07-02 23:07       ` Johannes Berg
2008-07-02 23:27         ` Larry Finger
2008-07-02 23:41           ` Johannes Berg
2008-07-03  9:19         ` Giacomo Mulas
2008-07-10 18:10           ` Pavel Machek

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=486C0206.7060606@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=debian-kernel@lists.debian.org \
    --cc=gmulas@ca.astro.it \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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

all inboxes | Powered by JetHome®