--- zzzz-none-000/linux-5.4.213/drivers/tty/serdev/serdev-ttyport.c 2022-09-15 10:04:56.000000000 +0000 +++ miami-7690-761/linux-5.4.213/drivers/tty/serdev/serdev-ttyport.c 2024-05-29 11:20:02.000000000 +0000 @@ -247,6 +247,18 @@ return tty->ops->tiocmset(tty, set, clear); } +static int ttyport_ioctl(struct serdev_controller *ctrl, + unsigned int cmd, unsigned long arg) +{ + struct serport *serport = serdev_controller_get_drvdata(ctrl); + struct tty_struct *tty = serport->tty; + + if (!tty->ops->ioctl) + return -EOPNOTSUPP; + + return tty->ops->ioctl(tty, cmd, arg); +} + static const struct serdev_controller_ops ctrl_ops = { .write_buf = ttyport_write_buf, .write_flush = ttyport_write_flush, @@ -259,6 +271,7 @@ .wait_until_sent = ttyport_wait_until_sent, .get_tiocm = ttyport_get_tiocm, .set_tiocm = ttyport_set_tiocm, + .ioctl = ttyport_ioctl, }; struct device *serdev_tty_port_register(struct tty_port *port,