summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorPaul Fulghum2006-09-01 06:27:36 +0200
committerLinus Torvalds2006-09-01 20:39:08 +0200
commit202af6d50155f8594ba01d8e0a54d77facc0152a (patch)
tree5f84f613d0304c990692de13e34708b020060f68 /drivers/char
parent[PATCH] md: Fix issues with referencing rdev in md/raid1 (diff)
downloadkernel-qcow2-linux-202af6d50155f8594ba01d8e0a54d77facc0152a.tar.gz
kernel-qcow2-linux-202af6d50155f8594ba01d8e0a54d77facc0152a.tar.xz
kernel-qcow2-linux-202af6d50155f8594ba01d8e0a54d77facc0152a.zip
[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 <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/synclink_gt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index b2dbbdb1bf81..2f07b085536b 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) {