Skip to contentSkip to conversation

three trivial fixes for 2.4.26

PATCH New Jakub Bogusz 1 participant 1 message May 10, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 three trivial fixes for 2.4.26

There are 3 trivial patches attached:
- don't use floating point in amd8111e driver (port from 2.6.x)
- include <asm/io.h> for io functions in farsync driver
- fix typo in drivers/mtd/maps/Config.in

(BTW, MTD_TSUNAMI driver is broken anyway, because it uses tsunami_tig_{read,write}b functions not defined anywhere in kernel)

Signature · 1 line
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/

Don't use floating point operations in amd8111e driver. This is port of Linus's changes from 2.6.x.

drivers/net/amd8111e.c renamed from drivers/net/amd8111e.c.orig +3 -3
@@ -1694,7 +1694,7 @@
 	/* Restart ipg timer */
 	if(lp->options & OPTION_DYN_IPG_ENABLE)	        
 		mod_timer(&lp->ipg_data.ipg_timer, 
-				jiffies + (IPG_CONVERGE_TIME * HZ));
+				jiffies + IPG_CONVERGE_JIFFIES);
 	spin_unlock_irq(&lp->lock);
 
 	return 0;
@@ -1768,7 +1768,7 @@
 		writew((u32)tmp_ipg, mmio + IPG); 
 		writew((u32)(tmp_ipg - IFS1_DELTA), mmio + IFS1); 
 	}
-	 mod_timer(&lp->ipg_data.ipg_timer, jiffies + (IPG_CONVERGE_TIME * HZ));
+	 mod_timer(&lp->ipg_data.ipg_timer, jiffies + IPG_CONVERGE_JIFFIES);
 	return;
 
 }
@@ -1905,7 +1905,7 @@
 		lp->ipg_data.ipg_timer.data = (unsigned long) dev;
 		lp->ipg_data.ipg_timer.function = (void *)&amd8111e_config_ipg;
 		lp->ipg_data.ipg_timer.expires = jiffies + 
-						 IPG_CONVERGE_TIME * HZ;
+						 IPG_CONVERGE_JIFFIES;
 		lp->ipg_data.ipg = DEFAULT_IPG;
 		lp->ipg_data.ipg_state = CSTATE;
 	};
drivers/net/amd8111e.h renamed from drivers/net/amd8111e.h.orig +1 -1
@@ -606,7 +606,7 @@
 /* ipg parameters */
 #define DEFAULT_IPG			0x60
 #define IFS1_DELTA			36
-#define	IPG_CONVERGE_TIME 0.5
+#define	IPG_CONVERGE_JIFFIES (HZ/2)
 #define	IPG_STABLE_TIME	5
 #define	MIN_IPG	96
 #define	MAX_IPG	255

Include <asm/io.h> for ioremap(), inl() etc.

drivers/net/wan/farsync.c renamed from drivers/net/wan/farsync.c.orig +1 -0
@@ -22,6 +22,7 @@
 #include <asm/uaccess.h>
 #include <linux/if.h>
 #include <linux/hdlc.h>
+#include <asm/io.h>
 
 #include "farsync.h"
 

Fix typo (s/CONFIG_MTD_GENPROBE/CONFIG_MTD_GEN_PROBE/).

drivers/mtd/maps/Config.in renamed from drivers/mtd/maps/Config.in.orig +1 -1
@@ -89,7 +89,7 @@
    dep_tristate '  JEDEC Flash device mapped on Ceiva/Polaroid PhotoMax Digital Picture Frame' CONFIG_MTD_CEIVA $CONFIG_MTD_JEDECPROBE  $CONFIG_ARCH_CEIVA
 fi
 if [ "$CONFIG_ALPHA" = "y" ]; then
-   dep_tristate '  Flash chip mapping on TSUNAMI' CONFIG_MTD_TSUNAMI $CONFIG_MTD_GENPROBE
+   dep_tristate '  Flash chip mapping on TSUNAMI' CONFIG_MTD_TSUNAMI $CONFIG_MTD_GEN_PROBE
 fi
 
 if [ "$CONFIG_UCLINUX" = "y" ]; then