All of lore.kernel.org
 help / color / mirror / Atom feed
* [REVERT] be6b38bcb175613f239e0b302607db346472c6b6. v2.6.34-rc3-406 oops with 4965AGN wireless
@ 2010-04-08 17:16 Jeff Chua
  2010-04-08 17:19 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Jeff Chua @ 2010-04-08 17:16 UTC (permalink / raw)
  To: Linus Torvalds, Wey-Yi Guy, Shanyu Zhao, Reinette Chatre
  Cc: stable, Linux Kernel


Linus,

I'm having problem with the latest git pull 2 days ago with the 4965AGN 
wireless.

Starting the wireless with WPA2 resulted in system hard freeze. Reverting 
the commit below solves the problem.


Thanks,
Jeff


commit be6b38bcb175613f239e0b302607db346472c6b6
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date:   Thu Mar 18 09:05:00 2010 -0700

     iwlwifi: counting number of tfds can be free for 4965

     Forget one hunk in 4965 during "iwlwifi: error checking for number of tfds
     in queue" patch.

     Reported-by: Shanyu Zhao <shanyu.zhao@intel.com>
     Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
     Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
     CC: stable@kernel.org

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 1bd2cd8..83c52a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2041,16 +2041,14 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
  				   tx_resp->failure_frame);

  		freed = iwl_tx_queue_reclaim(priv, txq_id, index);
-		if (qc && likely(sta_id != IWL_INVALID_STATION))
-			priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
+		iwl_free_tfds_in_queue(priv, sta_id, tid, freed);

  		if (priv->mac80211_registered &&
  		    (iwl_queue_space(&txq->q) > txq->q.low_mark))
  			iwl_wake_queue(priv, txq_id);
  	}

-	if (qc && likely(sta_id != IWL_INVALID_STATION))
-		iwl_txq_check_empty(priv, sta_id, tid, txq_id);
+	iwl_txq_check_empty(priv, sta_id, tid, txq_id);

  	if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
  		IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* Re: [REVERT] be6b38bcb175613f239e0b302607db346472c6b6. v2.6.34-rc3-406 oops with 4965AGN wireless
@ 2010-04-08 19:27 Jeff Chua
  2010-04-08 19:42 ` Jeff Chua
  2010-04-08 20:19 ` John W. Linville
  0 siblings, 2 replies; 15+ messages in thread
From: Jeff Chua @ 2010-04-08 19:27 UTC (permalink / raw)
  To: Wey-Yi Guy, Shanyu Zhao, Reinette Chatre, stable, Linux Kernel,
	Linus Torvalds, Al Viro



On Fri, Apr 9, 2010 at 1:19 AM, Linus Torvalds 
<torvalds@linux-foundation.org> wrote:

> I don't mind reverting patches, but I hate doing it blind and without 
> _any_ chance for the guilty party to try to fix it first.

> Can you post the oops that your subject implies happened? Maybe the 
> driver authors can find the proper fix without a revert?

The screen is so fast and never stops so I don't know how to capture that. 
I just tried the patch from Wey and had to modify it slightly to make it 
work.



On Fri, Apr 9, 2010 at 2:50 AM, Guy, Wey-Yi <wey-yi.w.guy@intel.com> 
wrote:

> Sorry for the problem caused by this patch, it is my mistake using the
similar approach for 4965 like the newer devices. could you try the
attach patch to see if this fix your system freeze problem.

Wey, the patch doesn't apply cleanly. I believe you meant "iwl_" instead 
of "iwlagn_".

Also, the checking for IWL_INVALID_STATION should be done after the "} 
else {" as in the original code prior to your patch. I just verified this 
with the patch below and it no longer oops.



On Fri, Apr 9, 2010 at 2:13 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:

> So what happens if we hit sta_id == IWL_INVALID_STATION and
> !txq->sched_retry?

> I'm not familiar with that code and I don't have the hardware, so this 
> is just from RTFS, but... might make sense to replace that call of 
> iwl_free_tfds_in_queue with
>       if (sta_id == IWL_INVALID_STATION)
>              printk(KERN_ERR "buggered");
>       else
>              iwl_free_tfds_in_queue(priv, sta_id, tid, freed);


I just tried that, but not seeing any invalid station messages. The 
KERN_ERR has been added below.




On Fri, Apr 9, 2010 at 4:09 AM, Guy, Wey-Yi <wey-yi.w.guy@intel.com> 
wrote:

> We can check for IWL_INVALID_STATION and print log, but need to check
> for qc to make sure it is valid; maybe something like


Ok, added below.



Thanks,
Jeff

--- drivers/net/wireless/iwlwifi/iwl-4965.c.org	2010-04-09 02:11:45.000000000 +0800
+++ drivers/net/wireless/iwlwifi/iwl-4965.c	2010-04-09 03:21:57.000000000 +0800
@@ -2012,10 +2012,18 @@

  		if (txq->q.read_ptr != (scd_ssn & 0xff)) {
  			index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
-			IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
-					   "%d index %d\n", scd_ssn , index);
+			IWL_DEBUG_TX_REPLY(priv,
+					"Retry scheduler reclaim scd_ssn "
+					"%d index %d\n", scd_ssn , index);
  			freed = iwl_tx_queue_reclaim(priv, txq_id, index);
  			iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+			if (qc && likely(sta_id != IWL_INVALID_STATION))
+				iwl_free_tfds_in_queue(priv, sta_id, tid,
+					freed);
+			else {
+				if (sta_id == IWL_INVALID_STATION)
+				       IWL_ERR(priv, "invalid station");
+			}

  			if (priv->mac80211_registered &&
  			    (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
@@ -2041,14 +2049,20 @@
  				   tx_resp->failure_frame);

  		freed = iwl_tx_queue_reclaim(priv, txq_id, index);
-		iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+		if (qc && likely(sta_id != IWL_INVALID_STATION))
+			iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+		else {
+			if (sta_id == IWL_INVALID_STATION)
+			       IWL_ERR(priv, "invalid station");
+		}

  		if (priv->mac80211_registered &&
  		    (iwl_queue_space(&txq->q) > txq->q.low_mark))
  			iwl_wake_queue(priv, txq_id);
  	}

-	iwl_txq_check_empty(priv, sta_id, tid, txq_id);
+	if (qc && likely(sta_id != IWL_INVALID_STATION))
+		iwl_txq_check_empty(priv, sta_id, tid, txq_id);

  	if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
  		IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-04-09  2:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 17:16 [REVERT] be6b38bcb175613f239e0b302607db346472c6b6. v2.6.34-rc3-406 oops with 4965AGN wireless Jeff Chua
2010-04-08 17:19 ` Linus Torvalds
2010-04-08 19:47   ` Peter Zijlstra
2010-04-08 18:13 ` Al Viro
2010-04-08 20:09   ` Guy, Wey-Yi
2010-04-08 20:24   ` Guy, Wey-Yi
2010-04-08 18:50 ` Guy, Wey-Yi
2010-04-08 19:27 Jeff Chua
2010-04-08 19:42 ` Jeff Chua
2010-04-08 20:50   ` Guy, Wey-Yi
2010-04-08 20:02     ` John W. Linville
2010-04-08 21:28       ` Guy, Wey-Yi
     [not found]     ` <k2yb6a2187b1004081736td3a4c0f3uc05451902bec39a5@mail.gmail.com>
2010-04-09  3:15       ` Guy, Wey-Yi
2010-04-08 20:19 ` John W. Linville
2010-04-08 20:39   ` John W. Linville

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.