[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] locks on pcnet32 watchdog timer


Hi,

We sometimes receive a "Bus master arbitration failure, status ffff" 
error on pcnet32 drivers while running a huge network load on a 2.6.x 
kernel. Applying spinlocks on the watchdog timer routine helps getting 
across the problem. A patch for the same is given below.

This patch has been created on 2.6.2-rc1 and tested on an SMP system on
IA32 platform.

Please cc me.

-------------------------------8<--------------------------------------

--- pcnet32-orig.c	2004-01-28 10:43:04.000000000 +0530
+++ pcnet32.c	2004-01-28 10:45:00.000000000 +0530
@@ -1695,12 +1695,14 @@
 static void pcnet32_watchdog(struct net_device *dev)
 {
     struct pcnet32_private *lp = dev->priv;
-
+    unsigned long flags;
+    spin_lock_irqsave(&lp->lock, flags);
     /* Print the link status if it has changed */
     if (lp->mii)
 	mii_check_media (&lp->mii_if, 1, 0);
 
     mod_timer (&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT);
+    spin_unlock_irqrestore(&lp->lock, flags);
 }
 
 static struct pci_driver pcnet32_driver = {

---------------------------------8<--------------------------------------

Regards,

Chinmay Albal
Linux Technology Centre,
IBM Software Labs, Bangalore,
mail - albal _at_ in.ibm.com


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」