home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / linux / 8799 < prev    next >
Encoding:
Text File  |  1992-08-21  |  1.6 KB  |  37 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!super!becker
  3. From: becker@super.org (Donald J. Becker)
  4. Subject: Re: conflicting serial ports
  5. Message-ID: <1992Aug21.012221.27164@super.org>
  6. Sender: news@super.org (USENET News System)
  7. Nntp-Posting-Host: metropolis
  8. Organization: IDA Supercomputing Research Center
  9. References: <jane.714294486@munagin>
  10. Date: Fri, 21 Aug 1992 01:22:21 GMT
  11. Lines: 24
  12.  
  13. < ... about device busy message when trying to open both serial devices 0
  14. and 2 or both 1 and 3, i.e. use COM1 and COM3 at the same time>
  15.  
  16. This shouldn't be too hard to fix.  In 'tty.c' add two new interrupt
  17. handlers along the model of the four that are already there: one that
  18. checks both COM1 and COM3, and a second that checks both COM2 and
  19. COM4.  (It's fine to check a serial port if no character is waiting.)
  20. Then instead of returning EBUSY when opening the second tty of the
  21. pair, install the appropriate dual handler.  On tty close check for a
  22. dual handler and, if you have one, drop back to the correct single
  23. line interrupt handler.
  24.  
  25. The simpler approach of always installing a dual handler means you
  26. will respond to spurious interrupt, and put characters into a queue
  27. noone is reading  -- it's not worth trying.
  28.  
  29. I too was curious about the EBUSY return, and it took a few seconds to
  30. figure out why Kermit wouldn't work under X.  Since it wasn't my
  31. machine I couldn't try out this change.  The (faster) fix of moving the
  32. modem off of the same pair of serial ports the mouse was on did work.
  33. -- 
  34. Donald Becker                       becker@super.org
  35. Supercomputing Research Center,  Institute for Defense Analyses
  36. 17100 Science Drive, Bowie MD 21114           301-805-7482
  37.