lkml.org 
[lkml]   [2000]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.3.47 tulip lockup
here the fix for the tulip deadlock at against 2.3.48pre1:

diff -urN 2.3.48pre1aa1/drivers/net/Makefile tulip/drivers/net/Makefile
--- 2.3.48pre1aa1/drivers/net/Makefile Thu Feb 24 18:31:16 2000
+++ tulip/drivers/net/Makefile Fri Feb 25 03:00:20 2000
@@ -130,6 +130,7 @@
obj-$(CONFIG_PCNET32) += pcnet32.o
obj-$(CONFIG_EEPRO100) += eepro100.o
obj-$(CONFIG_TLAN) += tlan.o
+obj-$(CONFIG_TULIP) += tulip/tulip.o
obj-$(CONFIG_EPIC100) += epic100.o
obj-$(CONFIG_SIS900) += sis900.o
obj-$(CONFIG_DM9102) += dmfe.o
diff -urN 2.3.48pre1aa1/drivers/net/tulip/interrupt.c tulip/drivers/net/tulip/interrupt.c
--- 2.3.48pre1aa1/drivers/net/tulip/interrupt.c Thu Feb 24 18:31:16 2000
+++ tulip/drivers/net/tulip/interrupt.c Fri Feb 25 03:43:20 2000
@@ -240,8 +240,8 @@
printk(KERN_WARNING "%s: The transmitter stopped."
" CSR5 is %x, CSR6 %x, new CSR6 %x.\n",
dev->name, csr5, inl(ioaddr + CSR6), tp->csr6);
- tulip_outl_CSR6(tp, tp->csr6 | 0x0002);
- tulip_outl_CSR6(tp, tp->csr6 | 0x2002);
+ __tulip_outl_CSR6(tp, tp->csr6 | 0x0002);
+ __tulip_outl_CSR6(tp, tp->csr6 | 0x2002);
}
spin_unlock(&tp->tx_lock);
}
diff -urN 2.3.48pre1aa1/drivers/net/tulip/tulip.h tulip/drivers/net/tulip/tulip.h
--- 2.3.48pre1aa1/drivers/net/tulip/tulip.h Thu Feb 24 18:31:16 2000
+++ tulip/drivers/net/tulip/tulip.h Fri Feb 25 03:46:54 2000
@@ -333,7 +333,18 @@
extern u16 t21041_csr13[];
extern u16 t21041_csr14[];
extern u16 t21041_csr15[];
-void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6);
+
+extern void __tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6);
+static inline void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6)
+{
+ long flags;
+
+ /* really a hw lock */
+ spin_lock_irqsave (&tp->tx_lock, flags);
+ __tulip_outl_CSR6 (tp, newcsr6);
+ spin_unlock_irqrestore (&tp->tx_lock, flags);
+}
+


#endif /* __NET_TULIP_H__ */
diff -urN 2.3.48pre1aa1/drivers/net/tulip/tulip_core.c tulip/drivers/net/tulip/tulip_core.c
--- 2.3.48pre1aa1/drivers/net/tulip/tulip_core.c Thu Feb 24 18:31:16 2000
+++ tulip/drivers/net/tulip/tulip_core.c Fri Feb 25 03:53:00 2000
@@ -192,15 +192,11 @@
/* The Xircom cards are picky about when certain bits in CSR6 can be
manipulated. Keith Owens <kaos@ocs.com.au>. */

-void tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6)
+void __tulip_outl_CSR6 (struct tulip_private *tp, u32 newcsr6)
{
long ioaddr = tp->base_addr;
const int strict_bits = 0x0060e202;
int csr5, csr5_22_20, csr5_19_17, currcsr6, attempts = 200;
- long flags;
-
- /* really a hw lock */
- spin_lock_irqsave (&tp->tx_lock, flags);

if (tp->chip_id != X3201_3)
goto out_write;
@@ -236,8 +232,6 @@
out_write:
/* now it is safe to change csr6 */
outl (newcsr6, ioaddr + CSR6);
-
- spin_unlock_irqrestore (&tp->lock, flags);
}


@@ -1009,6 +1003,9 @@
printk(KERN_INFO "%s: %s rev %d at %#3lx,",
dev->name, tulip_tbl[chip_idx].chip_name, chip_rev, ioaddr);

+ /* initalize before accessing the chipsets */
+ spin_lock_init(&tp->tx_lock);
+
/* Stop the chip's Tx and Rx processes. */
tulip_outl_CSR6(tp, inl(ioaddr + CSR6) & ~0x2002);
/* Clear the missed-packet counter. */
@@ -1131,7 +1128,6 @@
#ifdef TULIP_NO_MEDIA_SWITCH
tp->medialock = 1;
#endif
- tp->tx_lock = SPIN_LOCK_UNLOCKED;

/* The lower four bits are the media type. */
if (board_idx >= 0 && board_idx < MAX_UNITS) {
Andrea


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

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2011 Jasper Spaans