Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] n_r3964: fixed usage of HZ; removed bad include

Fix n_r3964 timeouts (hardcoded for 100Hz)

Also the include of <asm/termios.h> in 'n_r3964.h' is unnecessary and
prevents using the header file in any application that has to include
<termios.h> due to duplicate definition of 'struct termio'.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Kurt Huwig and committed by
Linus Torvalds
01e33b5a cdcdb286

+13 -7
+13 -7
include/linux/n_r3964.h
··· 13 13 * L. Haag 14 14 * 15 15 * $Log: r3964.h,v $ 16 + * Revision 1.4 2005/12/21 19:54:24 Kurt Huwig <kurt huwig de> 17 + * Fixed HZ usage on 2.6 kernels 18 + * Removed unnecessary include 19 + * 16 20 * Revision 1.3 2001/03/18 13:02:24 dwmw2 17 21 * Fix timer usage, use spinlocks properly. 18 22 * ··· 49 45 #define __LINUX_N_R3964_H__ 50 46 51 47 /* line disciplines for r3964 protocol */ 52 - #include <asm/termios.h> 53 48 54 49 #ifdef __KERNEL__ 50 + 51 + #include <linux/param.h> 52 + 55 53 /* 56 54 * Common ascii handshake characters: 57 55 */ ··· 64 58 #define NAK 0x15 65 59 66 60 /* 67 - * Timeouts (msecs/10 msecs per timer interrupt): 61 + * Timeouts (from milliseconds to jiffies) 68 62 */ 69 63 70 - #define R3964_TO_QVZ 550/10 71 - #define R3964_TO_ZVZ 220/10 72 - #define R3964_TO_NO_BUF 400/10 73 - #define R3964_NO_TX_ROOM 100/10 74 - #define R3964_TO_RX_PANIC 4000/10 64 + #define R3964_TO_QVZ ((550)*HZ/1000) 65 + #define R3964_TO_ZVZ ((220)*HZ/1000) 66 + #define R3964_TO_NO_BUF ((400)*HZ/1000) 67 + #define R3964_NO_TX_ROOM ((100)*HZ/1000) 68 + #define R3964_TO_RX_PANIC ((4000)*HZ/1000) 75 69 #define R3964_MAX_RETRIES 5 76 70 77 71 #endif