提交 7507e8bb 编写于 作者: O Oliver Neukum 提交者: Zheng Zengkai

cdc-acm: fix BREAK rx code path adding necessary calls

stable inclusion
from stable-5.10.28
commit e700e3aec303597851f3113b0837fde7af44223f
bugzilla: 51779

--------------------------------

commit 08dff274 upstream.

Counting break events is nice but we should actually report them to
the tty layer.

Fixes: 5a6a62bd ("cdc-acm: add TIOCMIWAIT")
Signed-off-by: NOliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20210311133714.31881-1-oneukum@suse.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e7b267b2
...@@ -313,8 +313,10 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf) ...@@ -313,8 +313,10 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
acm->iocount.dsr++; acm->iocount.dsr++;
if (difference & ACM_CTRL_DCD) if (difference & ACM_CTRL_DCD)
acm->iocount.dcd++; acm->iocount.dcd++;
if (newctrl & ACM_CTRL_BRK) if (newctrl & ACM_CTRL_BRK) {
acm->iocount.brk++; acm->iocount.brk++;
tty_insert_flip_char(&acm->port, 0, TTY_BREAK);
}
if (newctrl & ACM_CTRL_RI) if (newctrl & ACM_CTRL_RI)
acm->iocount.rng++; acm->iocount.rng++;
if (newctrl & ACM_CTRL_FRAMING) if (newctrl & ACM_CTRL_FRAMING)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册