--- zzzz-none-000/linux-5.15.111/drivers/tty/tty_io.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/drivers/tty/tty_io.c 2024-02-07 09:28:02.000000000 +0000 @@ -63,7 +63,11 @@ * Move do_SAK() into process context. Less stack use in devfs functions. * alloc_tty_struct() always uses kmalloc() * -- Andrew Morton 17Mar01 - */ + * + * + * Includes Intel Corporation's changes/modifications dated: [01/24/2013]. + * Changed/modified portions - Copyright © [2011], Intel Corporation. +*/ #include #include @@ -1096,6 +1100,10 @@ if (tty_paranoia_check(tty, file_inode(file), "tty_write")) return -EIO; + /* in case TCOOFF ioctl was called*/ + if (tty->flow.stopped == 1) { + return (ssize_t)tty->count; /* WARN: review if this is correct */ + } if (!tty || !tty->ops->write || tty_io_error(tty)) return -EIO; /* Short term debug to catch buggy drivers */