From 202af6d50155f8594ba01d8e0a54d77facc0152a Mon Sep 17 00:00:00 2001 From: Paul Fulghum Date: Thu, 31 Aug 2006 21:27:36 -0700 Subject: [PATCH] synclink_gt: fix receive tty error handling Fix receive tty error handling in synclink_gt driver. Adrian reported compiler warning for incorrect bit test against char variable. I determined these and other device specific error bits were incorrectly defined. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/synclink_gt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index b2dbbdb1bf8..2f07b085536 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -391,8 +391,8 @@ static MGSL_PARAMS default_params = { #define DESC_LIST_SIZE 4096 #define MASK_PARITY BIT1 -#define MASK_FRAMING BIT2 -#define MASK_BREAK BIT3 +#define MASK_FRAMING BIT0 +#define MASK_BREAK BIT14 #define MASK_OVERRUN BIT4 #define GSR 0x00 /* global status */ @@ -1800,17 +1800,17 @@ static void rx_async(struct slgt_info *info) stat = 0; - if ((status = *(p+1) & (BIT9 + BIT8))) { - if (status & BIT9) + if ((status = *(p+1) & (BIT1 + BIT0))) { + if (status & BIT1) icount->parity++; - else if (status & BIT8) + else if (status & BIT0) icount->frame++; /* discard char if tty control flags say so */ if (status & info->ignore_status_mask) continue; - if (status & BIT9) + if (status & BIT1) stat = TTY_PARITY; - else if (status & BIT8) + else if (status & BIT0) stat = TTY_FRAME; } if (tty) { -- cgit From 290995fc3c06c0548ae303dd0b1371a8727f4fad Mon Sep 17 00:00:00 2001 From: "Ian E. Morgan" Date: Thu, 31 Aug 2006 21:27:42 -0700 Subject: [PATCH] SBC8360: module_param() permission fixes The last argument of module_param is permissions, not default value. Acked-by: Wim Van Sebroeck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/watchdog/sbc8360.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/watchdog/sbc8360.c b/drivers/char/watchdog/sbc8360.c index 1035be5b501..41fc6f80c49 100644 --- a/drivers/char/watchdog/sbc8360.c +++ b/drivers/char/watchdog/sbc8360.c @@ -200,7 +200,7 @@ static int wd_margin = 0xB; static int wd_multiplier = 2; static int nowayout = WATCHDOG_NOWAYOUT; -module_param(timeout, int, 27); +module_param(timeout, int, 0); MODULE_PARM_DESC(timeout, "Index into timeout table (0-63) (default=27 (60s))"); module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, @@ -407,7 +407,7 @@ module_exit(sbc8360_exit); MODULE_AUTHOR("Ian E. Morgan "); MODULE_DESCRIPTION("SBC8360 watchdog driver"); MODULE_LICENSE("GPL"); -MODULE_VERSION("1.0"); +MODULE_VERSION("1.01"); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); /* end of sbc8360.c */ -- cgit From a9eec55623f5aedfcef745d3a0e0f97f5d4f74be Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Thu, 31 Aug 2006 21:27:45 -0700 Subject: [PATCH] IPMI: fix occasional oops on module unload Olaf Kirch of SuSE tracked down a problem where module unloads of the IPMI driver would occasionally result in Oopses. He tracked that down to a variable that wasn't always initialized properly in some situations. This patch initializes that variable. Olaf sent a patch that kzalloc-ed the data, but this structure is large enough that I would perfer to not do that. Thanks Olaf! Signed-off-by: Corey Minyard Cc: Olaf Kirch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/ipmi/ipmi_msghandler.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/char') diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 0aa5d608fe6..843d34c8627 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -3428,6 +3428,7 @@ struct ipmi_recv_msg *ipmi_alloc_recv_msg(void) rv = kmalloc(sizeof(struct ipmi_recv_msg), GFP_ATOMIC); if (rv) { + rv->user = NULL; rv->done = free_recv_msg; atomic_inc(&recv_msg_inuse_count); } -- cgit