Token Ring Fixes

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 7 Mar 98 18:06 GMT


This diff fixes two token ring problems

1. 2.1.8x randomly blows up on boot with TR enabled if you are unlucky
2. rif_init crashes on platforms with enforced read only kernel code
segments.

Related question: Does anyone have any IBM contacts who might know someone
who actually _knows_ what they are talking about with regard to the IBM
PCI Lanstreamer adapters. Right now I'm having fun trying to get the bus
mastering self test to pass and there are bad gaps and errors in the IBM
documentation for init of the board.

Alan

--- sysctl_net_802.c~ Wed Mar 4 21:57:52 1998
+++ sysctl_net_802.c Thu Mar 5 01:09:24 1998
@@ -23,5 +23,6 @@
ctl_table tr_table[] = {
{NET_TR_RIF_TIMEOUT, "rif_timeout", &sysctl_tr_rif_timeout, sizeof(int),
0644, NULL, &proc_dointvec},
+ {0}
};
#endif
--- tr.c~ Thu Mar 5 00:20:19 1998
+++ tr.c Sat Mar 7 19:07:17 1998
@@ -510,11 +510,16 @@
* Called during bootup. We don't actually have to initialise
* too much for this.
*/
+
+static struct proc_dir_entry tr_rif_proc = {
+ PROC_NET_TR_RIF, 6, "tr_rif",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ rif_get_info
+};

__initfunc(void rif_init(struct net_proto *unused))
{
- printk(KERN_INFO "RIF INIT\n");
-
rif_timer.expires = RIF_TIMEOUT;
rif_timer.data = 0L;
rif_timer.function = rif_check_expire;
@@ -522,12 +527,6 @@
add_timer(&rif_timer);

#ifdef CONFIG_PROC_FS
- proc_net_register(&(struct proc_dir_entry) {
- PROC_NET_TR_RIF, 6, "tr_rif",
- S_IFREG | S_IRUGO, 1, 0, 0,
- 0, &proc_net_inode_operations,
- rif_get_info
- });
+ proc_net_register(&tr_rif_proc);
#endif
- printk(KERN_INFO "RIF INITTED\n");
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu