Greetings,
We have a problem with drivers/serial/artpec.c (Not yet in main tree)
which uses hardware supported flow control (XON/XOFF). We do cfmakeraw()
and tcsetattr() from userspace to set a termios struct where (c_iflag &
IXON) is not set. The problem is that the call to tcsetattr() is not
propagated down to serial_artpec_set_termios(), the reason being that
uart_set_termios() doesn't think that IXON is a RELEVANT_IFLAG and
returns prematurely instead of calling uart_change_speed -->
ops->set_termios().
Could this be fixed by making IXON a RELEVANT_IFLAG?:
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 7f28307..d45473d 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1211,7 +1211,7 @@ static void uart_set_termios(struct tty_struct *tty,
* bits in c_cflag; c_[io]speed will always be set
* appropriately by set_termios() in tty_ioctl.c
*/
-#define RELEVANT_IFLAG(iflag) ((iflag) &
(IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+#define RELEVANT_IFLAG(iflag) ((iflag) &
(IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|IXON))
if ((cflag ^ old_termios->c_cflag) == 0 &&
tty->termios->c_ospeed == old_termios->c_ospeed &&
tty->termios->c_ispeed == old_termios->c_ispeed &&
Or should it be fixed at some other level?
Note: This was tested on 2.6.35 but appears to have the same code in the
newer kernels. Not many drivers seem to look at the IXON flag, only
crisv10, omap_serial and jsm_neo.
Best regards,
Mikael Johansson
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html