From: johnsonm@stolaf.edu (Michael K. Johnson) Subject: [ANNOUNCE] new setserial program available Date: Sun, 13 Dec 1992 03:40:41 GMT
A new setserial program has been uploaded to tsx-11, and is available
as tsx-11.mit.edu:/pub/linux/sources/sbin/setserial.tar.Z
It is also at sunsite.unc.edu:/pub/Linux/Incoming/setserial.tar.Z
until Jon decides to move it somewhere else.
This setserial is based on the old one by Rick Sladkey, but now allows
you to set higher speeds for your serial ports. See the README and
the source code in the package for details.
Although Ted has been posting for a while that it is possible to get
speeds higher than 38400 baud out of the driver just by issueing a
simple ioctl, aparantly nobody paid attention to him, because one of
the things I found out in doing this was that a small patch to
/usr/src/linux/kernel/chr_drv/serial.c is required for this to work.
I sent this patch to Ted for inspection: he hasn't yet gotten back to
me, but it works for me, so I'll let you all at it.
I have not included this patch in the distribution, because linux .99
should fix this, and that is coming soon enough that I figure that if
you are really that keen on getting this going, you can darn well save
a post with a patch ;-)
This patch is not guaranteed to work with anything other than .98.6,
but it will probably work with most anything back to about .98.2 or
so. .98.6 recommended, though.
michaelkjohnson
johnsonm@stolaf.edu
========8<========serial.diff
*** serial.c.orig Sat Dec 12 17:09:37 1992
--- serial.c Sat Dec 12 19:13:40 1992
***************
*** 10,15 ****
--- 10,18 ----
* multiple ports (or boards, if the hardware permits) to share a
* single IRQ channel.
*
+ * set_serial_info fixed to set higher baud rates, custom baud rates,
+ * and uart type. Michael K. Johnson 12/12/92.
+ *
* This module exports the following rs232 io functions:
*
* long rs_init(long);
***************
*** 681,686 ****
--- 684,698 ----
if (!new_info)
return -EFAULT;
memcpy_fromfs(&tmp,new_info,sizeof(tmp));
+ /* change highest speed hack */
+ info->flags |= (ASYNC_SPD_MASK & tmp.flags);
+ if ( (tmp.flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
+ info->custom_divisor = tmp.custom_divisor;
+ /* change the type? Well, I suppose that the detection routines
+ could get this wrong... 0x07 is the mask for all possible
+ uart types. This should be a value in tty.h */
+ info->type = (0x07 & tmp.type);
+
new_port = tmp.port;
new_irq = tmp.irq;
if (new_irq > 15 || new_port > 0xffff)
=======
-- Matt Welsh mdw@tc.cornell.edu Cornell Theory Center "Go on, emote! I was raised on thought balloons!"