moxa.c (fd531024bad7e5799e968ca70c0d3ca7b96b71ef) | moxa.c (6e94dbc7a4e49a028b81302d755bba1a518f973b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/*****************************************************************************/ 3/* 4 * moxa.c -- MOXA Intellio family multiport serial driver. 5 * 6 * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com). 7 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com> 8 * --- 1207 unchanged lines hidden (view full) --- 1216 set_bit(LOWWAIT, &ch->statusflags); 1217 return len; 1218} 1219 1220static int moxa_write_room(struct tty_struct *tty) 1221{ 1222 struct moxa_port *ch; 1223 | 1// SPDX-License-Identifier: GPL-2.0+ 2/*****************************************************************************/ 3/* 4 * moxa.c -- MOXA Intellio family multiport serial driver. 5 * 6 * Copyright (C) 1999-2000 Moxa Technologies (support@moxa.com). 7 * Copyright (c) 2007 Jiri Slaby <jirislaby@gmail.com> 8 * --- 1207 unchanged lines hidden (view full) --- 1216 set_bit(LOWWAIT, &ch->statusflags); 1217 return len; 1218} 1219 1220static int moxa_write_room(struct tty_struct *tty) 1221{ 1222 struct moxa_port *ch; 1223 |
1224 if (tty->stopped) | 1224 if (tty->flow.stopped) |
1225 return 0; 1226 ch = tty->driver_data; 1227 if (ch == NULL) 1228 return 0; 1229 return MoxaPortTxFree(ch); 1230} 1231 1232static void moxa_flush_buffer(struct tty_struct *tty) --- 136 unchanged lines hidden (view full) --- 1369 u16 intr; 1370 1371 if (tty) { 1372 if (test_bit(EMPTYWAIT, &p->statusflags) && 1373 MoxaPortTxQueue(p) == 0) { 1374 clear_bit(EMPTYWAIT, &p->statusflags); 1375 tty_wakeup(tty); 1376 } | 1225 return 0; 1226 ch = tty->driver_data; 1227 if (ch == NULL) 1228 return 0; 1229 return MoxaPortTxFree(ch); 1230} 1231 1232static void moxa_flush_buffer(struct tty_struct *tty) --- 136 unchanged lines hidden (view full) --- 1369 u16 intr; 1370 1371 if (tty) { 1372 if (test_bit(EMPTYWAIT, &p->statusflags) && 1373 MoxaPortTxQueue(p) == 0) { 1374 clear_bit(EMPTYWAIT, &p->statusflags); 1375 tty_wakeup(tty); 1376 } |
1377 if (test_bit(LOWWAIT, &p->statusflags) && !tty->stopped && | 1377 if (test_bit(LOWWAIT, &p->statusflags) && !tty->flow.stopped && |
1378 MoxaPortTxQueue(p) <= WAKEUP_CHARS) { 1379 clear_bit(LOWWAIT, &p->statusflags); 1380 tty_wakeup(tty); 1381 } 1382 1383 if (inited && !tty_throttled(tty) && 1384 MoxaPortRxQueue(p) > 0) { /* RX */ 1385 MoxaPortReadData(p); --- 712 unchanged lines hidden --- | 1378 MoxaPortTxQueue(p) <= WAKEUP_CHARS) { 1379 clear_bit(LOWWAIT, &p->statusflags); 1380 tty_wakeup(tty); 1381 } 1382 1383 if (inited && !tty_throttled(tty) && 1384 MoxaPortRxQueue(p) > 0) { /* RX */ 1385 MoxaPortReadData(p); --- 712 unchanged lines hidden --- |