cvs commit: src/sys/dev/nmdm nmdm.c

Poul-Henning Kamp phk at FreeBSD.org
Tue Jun 1 15:53:01 PDT 2004


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


More information about the cvs-src mailing list