--- zzzz-none-000/linux-4.19.183/drivers/tty/n_tty.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/drivers/tty/n_tty.c 2023-06-28 08:54:20.000000000 +0000 @@ -2313,6 +2313,15 @@ down_read(&tty->termios_rwsem); +#if defined(CONFIG_AVM_ENHANCED) + if (tty->driver->ops->avm_console_enabled) { + if (!tty->driver->ops->avm_console_enabled(tty)) { + b += nr; + goto skip_out; + } + } +#endif + /* Write out any echoed characters that are still pending */ process_echoes(tty); @@ -2377,6 +2386,9 @@ } break_out: remove_wait_queue(&tty->write_wait, &wait); +#if defined(CONFIG_AVM_ENHANCED) +skip_out: +#endif if (nr && tty->fasync) set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); up_read(&tty->termios_rwsem);