* [PATCH] tty/n_gsm: fix bug in tiocmset
@ 2011-09-23 8:59 Nikola Diklic-Perin
2011-09-23 10:05 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Nikola Diklic-Perin @ 2011-09-23 8:59 UTC (permalink / raw)
To: linux-kernel, linux-serial; +Cc: diklic.perin.nikola
From: Nikola Diklic-Perin <diklic.perin.nikola@gmail.com>
Clear bitmask was not inverted before masking modem_tx.
Calling ioctl(fd, TIOCMBIC, TIOCM_RTS) results in:
[ 197.430000] pre_modem_tx: 0x00000006
[ 197.430000] clear: 0x00000004
[ 197.430000] set: 0x00000000
[ 197.440000] post_modem_tx: 0x00000004
which is wrong.
Signed-off-by: Nikola Diklic-Perin <diklic.perin.nikola@gmail.com>
---
--- a/drivers/tty/n_gsm.c 2011-09-22 18:19:16.592480805 +0200
+++ b/drivers/tty/n_gsm.c 2011-09-21 16:15:29.506800052 +0200
@@ -2982,7 +2982,7 @@ static int gsmtty_tiocmset(struct tty_st
struct gsm_dlci *dlci = tty->driver_data;
unsigned int modem_tx = dlci->modem_tx;
- modem_tx &= clear;
+ modem_tx &= ~clear;
modem_tx |= set;
if (modem_tx != dlci->modem_tx) {
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] tty/n_gsm: fix bug in tiocmset
2011-09-23 8:59 [PATCH] tty/n_gsm: fix bug in tiocmset Nikola Diklic-Perin
@ 2011-09-23 10:05 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2011-09-23 10:05 UTC (permalink / raw)
To: Nikola Diklic-Perin; +Cc: linux-kernel, linux-serial, greg
On Fri, 23 Sep 2011 10:59:43 +0200
Nikola Diklic-Perin <diklic.perin.nikola@gmail.com> wrote:
> From: Nikola Diklic-Perin <diklic.perin.nikola@gmail.com>
>
> Clear bitmask was not inverted before masking modem_tx.
>
> Calling ioctl(fd, TIOCMBIC, TIOCM_RTS) results in:
>
> [ 197.430000] pre_modem_tx: 0x00000006
> [ 197.430000] clear: 0x00000004
> [ 197.430000] set: 0x00000000
> [ 197.440000] post_modem_tx: 0x00000004
>
> which is wrong.
>
> Signed-off-by: Nikola Diklic-Perin <diklic.perin.nikola@gmail.com>
Acked-by: Alan Cox <alan@linx.intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-23 10:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 8:59 [PATCH] tty/n_gsm: fix bug in tiocmset Nikola Diklic-Perin
2011-09-23 10:05 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®