Author: maks-guest
Date: Wed Nov  1 22:44:09 2006
New Revision: 7679

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/net-bcm43xx_netdev_watchdog.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/4
Log:
bcm43xx round2


Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog      (original)
+++ dists/trunk/linux-2.6/debian/changelog      Wed Nov  1 22:44:09 2006
@@ -44,6 +44,8 @@
   * r8169: pull revert mac address change support.
   * [amd64]: Add upstream fix C3 timer test for dual core laptops.
   * [s390]: Fix funny timespeed on hercules emulator. (closes: 395247)
+  * bcm43xx: Add full netdev watchout timeout patch. (closes: 392065)
+    Thanks Sjoerd Simons <[EMAIL PROTECTED]> for the testing.
 
   [ Sven Luther ]
   * [powerpc] Added exception alignement patch from Benjamin Herrenschmidt.
@@ -51,7 +53,7 @@
   [ Frederik Schüler ]
   * Bump ABI to 2.
 
- -- maximilian attems <[EMAIL PROTECTED]>  Wed,  1 Nov 2006 22:36:16 +0100
+ -- maximilian attems <[EMAIL PROTECTED]>  Wed,  1 Nov 2006 22:42:06 +0100
 
 linux-2.6 (2.6.18-3) unstable; urgency=low
 

Added: 
dists/trunk/linux-2.6/debian/patches/bugfix/net-bcm43xx_netdev_watchdog.patch
==============================================================================
--- (empty file)
+++ 
dists/trunk/linux-2.6/debian/patches/bugfix/net-bcm43xx_netdev_watchdog.patch   
    Wed Nov  1 22:44:09 2006
@@ -0,0 +1,63 @@
+Index: linux-2.6.18/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+===================================================================
+--- linux-2.6.18.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
++++ linux-2.6.18/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+@@ -3159,24 +3159,42 @@ static int estimate_periodic_work_badnes
+ static void bcm43xx_periodic_work_handler(void *d)
+ {
+       struct bcm43xx_private *bcm = d;
++      struct net_device *net_dev = bcm->net_dev;
+       unsigned long flags;
+       u32 savedirqs = 0;
+       int badness;
++      unsigned long orig_trans_start = 0;
+ 
+-      badness = estimate_periodic_work_badness(bcm->periodic_state);
+       mutex_lock(&bcm->mutex);
+-      netif_tx_disable(bcm->net_dev);
+-      spin_lock_irqsave(&bcm->irq_lock, flags);
++      badness = estimate_periodic_work_badness(bcm->periodic_state);
+       if (badness > BADNESS_LIMIT) {
+               /* Periodic work will take a long time, so we want it to
+                * be preemtible.
+                */
++
++              netif_tx_lock_bh(net_dev);
++              /* We must fake a started transmission here, as we are going to
++               * disable TX. If we wouldn't fake a TX, it would be possible to
++               * trigger the netdev watchdog, if the last real TX is already
++               * some time on the past (slightly less than 5secs)
++               */
++              orig_trans_start = net_dev->trans_start;
++              net_dev->trans_start = jiffies;
++              netif_stop_queue(net_dev);
++              netif_tx_unlock_bh(net_dev);
++
++              spin_lock_irqsave(&bcm->irq_lock, flags);
+               bcm43xx_mac_suspend(bcm);
+               if (bcm43xx_using_pio(bcm))
+                       bcm43xx_pio_freeze_txqueues(bcm);
+               savedirqs = bcm43xx_interrupt_disable(bcm, BCM43xx_IRQ_ALL);
+               spin_unlock_irqrestore(&bcm->irq_lock, flags);
+               bcm43xx_synchronize_irq(bcm);
++      } else {
++              /* Periodic work should take short time, so we want low
++               * locking overhead.
++               */
++              spin_lock_irqsave(&bcm->irq_lock, flags);
+       }
+ 
+       do_periodic_work(bcm);
+@@ -3188,10 +3206,11 @@ static void bcm43xx_periodic_work_handle
+               if (bcm43xx_using_pio(bcm))
+                       bcm43xx_pio_thaw_txqueues(bcm);
+               bcm43xx_mac_enable(bcm);
++              netif_wake_queue(bcm->net_dev);
++              net_dev->trans_start = orig_trans_start;
+       }
+       mmiowb();
+       spin_unlock_irqrestore(&bcm->irq_lock, flags);
+-      netif_wake_queue(bcm->net_dev);
+       mutex_unlock(&bcm->mutex);
+ }
+ 

Modified: dists/trunk/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/4       (original)
+++ dists/trunk/linux-2.6/debian/patches/series/4       Wed Nov  1 22:44:09 2006
@@ -23,3 +23,4 @@
 + bugfix/powerpc/interrupt-alignement.patch
 + bugfix/sparc/sunblade1k-boot-fix.patch
 + bugfix/__div64_32-for-31-bit.patch
++ bugfix/net-bcm43xx_netdev_watchdog.patch

_______________________________________________
Kernel-svn-changes mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

Reply via email to