[comp.os.minix] Why no ispeed/ospeed??

lmjm@doc.ic.ac.uk (Lee McLoughlin) (02/28/88)

I was just going thru the Minix book and being a long time uucp worker
I was looking at it with an eye to modem control and such.  I must confess
to being quite suprised to find that there was no sg_ispeed and sg_ospeed
fields in the sgttyb structure.  Indeed there is no baud rate control
anywhere that I can find.

How are you supposed to achieve this?

Is sg_i/ospeed coming?

Why is it currently missing?

	Yours a soon-to-be minix user.

		Lee.
--
UKUUCP SUPPORT  Lee McLoughlin
	"What you once thought was only a nightmare is now a reality!"

Janet: lmjm@uk.ac.ic.doc, lmcl@uk.ac.ukc
DARPA: lmjm@doc.ic.ac.uk (or lmjm%uk.ac.ic.doc@nss.cs.ucl.ac.uk)
Uucp:  lmjm@icdoc.UUCP, ukc!icdoc!lmjm

paradis@encore.UUCP (Jim Paradis) (03/02/88)

In article <213@gould.doc.ic.ac.uk> lmjm@doc.ic.ac.uk (Lee McLoughlin) writes:
>[I was] quite suprised to find that there was no sg_ispeed and sg_ospeed
>fields in the sgttyb structure.  Indeed there is no baud rate control
>anywhere that I can find.

Actually, sg_ispeed and sg_ospeed ARE defined in /usr/include/sgtty.h in
the MINIX 1.1 distribution, but they're not used in that distribution
(read on)

>How are you supposed to achieve this?
>Is sg_i/ospeed coming?
>Why is it currently missing?

It's currently missing because MINIX as it comes out of the box lacks
a serial TTY driver.  Its tty driver only supports the IBM-PC keyboard
and video adapter.  Baud rates have no meaning there.  It's also missing
because the way ioctl currently works is to pack as much of the
parameters as it can into a MINIX message structure (overloading like
crazy at times) and send it off... and there's simply no room in the
message structure for the ispeed and ospeed fields.

In case you didn't catch it, I posted a serial tty driver to the net
sometime back and have been working (off and on) on bug fixes and
enhancements ever since; one of my enhancements was to re-do ioctl such
that it passes the address of the ioctl structure to the kernel, and
the kernel copies the structure in and out.  This way, ioctl structures
may be made arbitrarily large.

(For those who are waiting:  Yes, I'm working on all this stuff, but
I have a day-job that I occasionally have to do real work at too 8-).
It's coming, it's coming... if someone's willing to pay me $60K/yr to
hack MINIX full-time I'd be more than glad to do so 8-) 8-) 8-)  )


   +----------------+  Jim Paradis                  linus--+
+--+-------------+  |  Encore Computer Corp.       necntc--|
|  | E N C O R E |  |  257 Cedar Hill St.           ihnp4--+-encore!paradis
|  +-------------+--+  Marlboro MA 01752           decvax--|
+----------------+     (617) 460-0500             talcott--+
Well, what's the pleasure in THAT??!!

rmtodd@uokmax.UUCP (Richard Michael Todd) (03/02/88)

In article <213@gould.doc.ic.ac.uk> lmjm@icdoc.UUCP writes:
>I was looking at it with an eye to modem control and such.  I must confess
>to being quite suprised to find that there was no sg_ispeed and sg_ospeed
>fields in the sgttyb structure.  Indeed there is no baud rate control
>anywhere that I can find.
That's because the original MINIX didn't have any drivers at all for the
serial port.  There isn't much point in changing the speed of the port if
you can't read or write to it.  Thus the ioctl() implementation wasn't
designed to handle ispeed and ospeed
>How are you supposed to achieve this?
Currently you don't.  In the current implementation of Jim Paradis's serial-
port device driver, the baud rate is hardwired into the kernel.  Not great,
but better than no serial port access at all, which is what we had before.
Supposedly Jim's going to redo the ioctl() implementation to add ispeed
and ospeed.