Date: Tue, 1 Jun 2004 15:53:00 -0700 (PDT) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/nmdm nmdm.c Message-ID: <200406012253.i51Mr06C022410@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 2004/06/01 15:53:00 PDT
FreeBSD src repository
Modified files:
sys/dev/nmdm nmdm.c
Log:
A major overhaul of the nmdm(4) driver:
It was based on the pty(4) driver which as a tty side an a non-tty side.
Nmdm(4) seems to have inherited two symmetric sides from pty but
unfortunately they are not quite ttys. Running a getty one one
side and tip on the other failed to produce NL->CRNL mapping for
instance.
Rip out the basically bogus cdevsw->{read,write} functions and rely
on ttyread() and ttywrite() which does the same thing.
Use taskqueue_swi_giant to run a task for either side to do what
needs to be done. (Direct calling is not an option as it leads to
recursion.) Trigger the task from the t_oproc and t_stop methods.
Default the ports to not ECHO. Since we neither rate limiting nor
emulation, two ports echoing each other is a really bad idea, which
can only be properly mitigated by rate limiting, rate emulation or
intelligent detection. Rate emulation would be a neat feature.
Ditch the modem-line emulation, if needed for some app, it needs
to be thought much more about how it interacts with the open/close
logic.
Revision Changes Path
1.25 +81 -375 src/sys/dev/nmdm/nmdm.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406012253.i51Mr06C022410>
