From: becker@super.org (Donald J. Becker) Subject: Re: conflicting serial ports Date: 21 Aug 1992 01:22:21 GMT
< ... about device busy message when trying to open both serial devices 0
and 2 or both 1 and 3, i.e. use COM1 and COM3 at the same time>
This shouldn't be too hard to fix. In 'tty.c' add two new interrupt
handlers along the model of the four that are already there: one that
checks both COM1 and COM3, and a second that checks both COM2 and
COM4. (It's fine to check a serial port if no character is waiting.)
Then instead of returning EBUSY when opening the second tty of the
pair, install the appropriate dual handler. On tty close check for a
dual handler and, if you have one, drop back to the correct single
line interrupt handler.
The simpler approach of always installing a dual handler means you
will respond to spurious interrupt, and put characters into a queue
noone is reading -- it's not worth trying.
I too was curious about the EBUSY return, and it took a few seconds to
figure out why Kermit wouldn't work under X. Since it wasn't my
machine I couldn't try out this change. The (faster) fix of moving the
modem off of the same pair of serial ports the mouse was on did work.
-- Donald Becker becker@super.org Supercomputing Research Center, Institute for Defense Analyses 17100 Science Drive, Bowie MD 21114 301-805-7482