1 In message <20030308.130112.09061347.davem@redhat.com>,"David S. Miller" writes:
2 >This patch doesn't apply at all, it deletes lines referencing
3 >idt77105_priv_lock but that does not appear in the sources.
5 yes that's my fault. i had an intermediate change i forgot about.
6 this would be the correct diff for idt77105 --
8 Index: linux/drivers/atm/idt77105.c
9 ===================================================================
10 RCS file: /home/chas/CVSROOT/linux/drivers/atm/idt77105.c,v
11 retrieving revision 1.1
12 retrieving revision 1.3
14 --- linux/drivers/atm/idt77105.c 20 Feb 2003 13:45:03 -0000 1.1
15 +++ linux/drivers/atm/idt77105.c 5 Mar 2003 16:39:56 -0000 1.3
17 #include <linux/init.h>
18 #include <linux/capability.h>
19 #include <linux/atm_idt77105.h>
20 +#include <linux/spinlock.h>
21 #include <asm/system.h>
22 #include <asm/param.h>
23 #include <asm/uaccess.h>
25 unsigned char old_mcr; /* storage of MCR reg while signal lost */
28 +static spinlock_t idt77105_priv_lock = SPIN_LOCK_UNLOCKED;
30 #define PRIV(dev) ((struct idt77105_priv *) dev->phy_data)
34 struct idt77105_stats stats;
38 + spin_lock_irqsave(&idt77105_priv_lock, flags);
39 memcpy(&stats, &PRIV(dev)->stats, sizeof(struct idt77105_stats));
41 memset(&PRIV(dev)->stats, 0, sizeof(struct idt77105_stats));
42 - restore_flags(flags);
43 + spin_unlock_irqrestore(&idt77105_priv_lock, flags);
46 return copy_to_user(arg, &PRIV(dev)->stats,
48 if (!(PRIV(dev) = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL)))
53 + spin_lock_irqsave(&idt77105_priv_lock, flags);
54 PRIV(dev)->next = idt77105_all;
55 idt77105_all = PRIV(dev);
56 - restore_flags(flags);
57 + spin_unlock_irqrestore(&idt77105_priv_lock, flags);
58 memset(&PRIV(dev)->stats,0,sizeof(struct idt77105_stats));
60 /* initialise dev->signal from Good Signal Bit */
62 idt77105_stats_timer_func(0); /* clear 77105 counters */
63 (void) fetch_stats(dev,NULL,1); /* clear kernel counters */
66 - if (!start_timer) restore_flags(flags);
68 + spin_lock_irqsave(&idt77105_priv_lock, flags);
71 - restore_flags(flags);
73 init_timer(&stats_timer);
74 stats_timer.expires = jiffies+IDT77105_STATS_TIMER_PERIOD;
76 restart_timer.function = idt77105_restart_timer_func;
77 add_timer(&restart_timer);
79 + spin_unlock_irqrestore(&idt77105_priv_lock, flags);
84 -static const struct atmphy_ops idt77105_ops = {
91 -int __init idt77105_init(struct atm_dev *dev)
95 - dev->phy = &idt77105_ops;
101 - * TODO: this function should be called through phy_ops
102 - * but that will not be possible for some time as there is
103 - * currently a freeze on modifying that structure
104 - * -- Greg Banks, 13 Sep 1999
106 int idt77105_stop(struct atm_dev *dev)
108 struct idt77105_priv *walk, *prev;
109 @@ -372,30 +349,33 @@
118 +static const struct atmphy_ops idt77105_ops = {
119 + start: idt77105_start,
120 + ioctl: idt77105_ioctl,
121 + interrupt: idt77105_int,
122 + stop: idt77105_stop,
125 -EXPORT_SYMBOL(idt77105_init);
126 -EXPORT_SYMBOL(idt77105_stop);
128 -MODULE_LICENSE("GPL");
132 -int init_module(void)
133 +int idt77105_init(struct atm_dev *dev)
135 + dev->phy = &idt77105_ops;
139 +EXPORT_SYMBOL(idt77105_init);
141 -void cleanup_module(void)
142 +static void __exit idt77105_exit(void)
144 /* turn off timers */
145 del_timer(&stats_timer);
146 del_timer(&restart_timer);
150 +module_exit(idt77105_exit);
152 +MODULE_LICENSE("GPL");
154 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
155 the body of a message to majordomo@vger.kernel.org
156 More majordomo info at http://vger.kernel.org/majordomo-info.html
157 Please read the FAQ at http://www.tux.org/lkml/