summaryrefslogtreecommitdiffstats
path: root/sys/dev/cx
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-06-04 08:02:37 +0000
committerphk <phk@FreeBSD.org>2004-06-04 08:02:37 +0000
commit9bb2c2f2d29e403661d3a82df654de61b0356def (patch)
tree96f709f4adacd5078943626c84918a97005223bc /sys/dev/cx
parent41a29cfd2f86e0a0e54ffc45a69c5bfd031f1e2d (diff)
downloadFreeBSD-src-9bb2c2f2d29e403661d3a82df654de61b0356def.zip
FreeBSD-src-9bb2c2f2d29e403661d3a82df654de61b0356def.tar.gz
Make the remaining serial drivers call ttyioctl() rather than calling
the linedisc directly.
Diffstat (limited to 'sys/dev/cx')
-rw-r--r--sys/dev/cx/if_cx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index b22e84a..e69aa42 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -2117,6 +2117,15 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
}
if (c->mode == M_ASYNC) {
+#if __FreeBSD_version >= 502113
+ error = ttyioctl (dev, cmd, data, flag, td);
+ disc_optim (&d->tty, &d->tty.t_termios);
+ if (error != ENOTTY) {
+ if (error)
+ CX_DEBUG2 (d, ("ttioctl: 0x%lx, error %d\n", cmd, error));
+ return error;
+ }
+#else
#if __FreeBSD_version >= 500000
error = (*linesw[d->tty.t_line].l_ioctl) (&d->tty, cmd, data, flag, td);
#else
@@ -2135,6 +2144,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
CX_DEBUG2 (d, ("ttioctl: 0x%lx, error %d\n", cmd, error));
return error;
}
+#endif
}
switch (cmd) {
OpenPOWER on IntegriCloud