Re: Serial Port Configuration does not work

看板FB_current作者時間14年前 (2011/09/11 19:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/12 (看更多)
On Tue, Sep 06, 2011 at 04:29:51PM +0400, Boris Samorodov wrote: > the port does not work as expected (at least as per The Handbook, > 26.2.5 Serial Port Configuration). Nether "init" nor "lock" > devices can be used: > ----- > # uname -a > FreeBSD host1.ipt.ru 9.0-BETA2 FreeBSD 9.0-BETA2 #14 r225395: Mon Sep 5 18:10:43 MSK 2011 bsam@bb.ipt.ru:/usr/obj/usr/src/sys/HOSTS i386 > # ls -l /dev/ttyu5* > crw------- 1 root wheel 0, 56 Sep 5 18:50 /dev/ttyu5 > crw------- 1 root wheel 0, 57 Sep 5 18:50 /dev/ttyu5.init > crw------- 1 root wheel 0, 58 Sep 5 18:50 /dev/ttyu5.lock > # stty -f /dev/ttyu5.init 57600 > stty: /dev/ttyu5.lock isn't a terminal > # stty -f /dev/ttyu5.lock cs7 > stty: /dev/ttyu5.lock isn't a terminal > ----- It looks like r223722, while introducing the ability to issue device-specific ioctls on init and lock devices, broke the ability to issue generic ioctls, with the exception of TIOCSETA. (However, stty will not do much if it cannot do TIOCGETA.) Try this patch and report if it works: diff --git a/sys/kern/tty.c b/sys/kern/tty.c index ce49f97..3721888 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -777,6 +777,7 @@ ttyil_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, error = ttydevsw_cioctl(tp, dev2unit(dev), cmd, data, td); if (error != ENOIOCTL) goto done; + error = 0; switch (cmd) { case TIOCGETA: -- Jilles Tjoelker _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1ER9moU3 (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1ER9moU3 (FB_current)