[PATCH] ibmtr.c fix for 2.4.0test1

From: Phillips, Mike (PHILLIM@amtrak.com)
Date: Fri Jun 09 2000 - 11:34:17 EST


Attached is the simple patch to fix the ibmtr.c hang on 2.4.0. The
spin_lock_init was being done in the wrong place, and we were trying to get
a lock before the init was done. This has been in the driver for a while,
so previous kernels, compile options, whatever must have defaulted the
ti->lock to the unlocked state, whereas 2.4.0 does whatever it wants.

Mike Phillips

--- ibmtr.c.orig Fri Jun 9 12:23:53 2000
+++ ibmtr.c Fri Jun 9 12:24:23 2000
@@ -781,6 +781,9 @@
 {
         struct tok_info *ti=(struct tok_info *)dev->priv;
 
+ /* init the spinlock */
+ spin_lock_init(&ti->lock);
+
         SET_PAGE(ti->srb_page);
         ti->open_status = CLOSED;
 
@@ -845,9 +848,6 @@
 static int tok_open(struct net_device *dev)
 {
         struct tok_info *ti=(struct tok_info *)dev->priv;
-
- /* init the spinlock */
- spin_lock_init(&ti->lock);
 
         if (ti->open_status==CLOSED) tok_init_card(dev);
 

-
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/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:19 EST