diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 7b99bd7b1cab..6cdf6b919d0f 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -830,6 +830,7 @@ again: goto again; } error = (*linesw[tp->t_line].l_open)(dev, tp); + disc_optim(tp, &tp->t_termios, rc); if ((tp->t_state & TS_ISOPEN) && CALLOUT(dev)) rc->rc_flags |= RC_ACTOUT; out: @@ -860,6 +861,7 @@ rcclose(dev, flag, mode, p) #endif s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); + disc_optim(tp, &tp->t_termios, rc); rcstop(tp, FREAD | FWRITE); rc_hardclose(rc); ttyclose(tp); @@ -1133,6 +1135,7 @@ struct proc *p; if (error >= 0) return (error); error = ttioctl(tp, cmd, data, flag); + disc_optim(tp, &tp->t_termios, rc); if (error >= 0) return (error); s = spltty(); diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c index 7b99bd7b1cab..6cdf6b919d0f 100644 --- a/sys/i386/isa/rc.c +++ b/sys/i386/isa/rc.c @@ -830,6 +830,7 @@ again: goto again; } error = (*linesw[tp->t_line].l_open)(dev, tp); + disc_optim(tp, &tp->t_termios, rc); if ((tp->t_state & TS_ISOPEN) && CALLOUT(dev)) rc->rc_flags |= RC_ACTOUT; out: @@ -860,6 +861,7 @@ rcclose(dev, flag, mode, p) #endif s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); + disc_optim(tp, &tp->t_termios, rc); rcstop(tp, FREAD | FWRITE); rc_hardclose(rc); ttyclose(tp); @@ -1133,6 +1135,7 @@ struct proc *p; if (error >= 0) return (error); error = ttioctl(tp, cmd, data, flag); + disc_optim(tp, &tp->t_termios, rc); if (error >= 0) return (error); s = spltty();