From: Paul Fulghum <paulkf@microgate.com>
To: Andrew Morton <akpm@osdl.org>, Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] synclink_gt fix receive tty error handling
Date: Mon, 28 Aug 2006 14:07:13 -0500 [thread overview]
Message-ID: <1156792033.18811.10.camel@amdx2.microgate.com> (raw)
In-Reply-To: <20060826020123.GB4765@stusta.de>
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>
--- linux-2.6.18-rc5/drivers/char/synclink_gt.c 2006-08-28 08:39:18.000000000 -0500
+++ b/drivers/char/synclink_gt.c 2006-08-28 10:38:49.000000000 -0500
@@ -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 *i
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) {
prev parent reply other threads:[~2006-08-28 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-26 2:01 drivers/char/synclink_gt.c: chars don't have more than 8 bits Adrian Bunk
2006-08-26 2:49 ` Paul Fulghum
2006-08-28 19:07 ` Paul Fulghum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1156792033.18811.10.camel@amdx2.microgate.com \
--to=paulkf@microgate.com \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.