Subject: Re: fifo overrun
To: matthew green <mrg@eterna.com.au>
From: Brad Salai <bsalai@tmonline.com>
List: port-sparc
Date: 10/30/1997 08:30:24
At 3:20 PM +1100 10/30/97, matthew green wrote:
>   I got to testing the fifo overrun problem a little, and there is no problem
>   at 19.2, but there is at 38400.  I'd like to try values in between, but
>   tcsetattr won't permit them. Is there a reason why it has to be this way?
>   Seems like 28.8 and 33.whatever should be allowed too.
>
>
>funny, i was looking at this recently...
>
>
>from sys/arch/sparc/dev/zs.c:zs_set_speed():
>
>        /* XXX - Allow some tolerance here? */
>	if (real_bps != bps)
>		return (EINVAL);
>
>
>basically, the chip only supports certain values, and the current driver
>will reject speeds not allowed, rather than just fudging it by actually
>setting the speed to the real value.

I agree that it is better to fail than to fudge and not let the user know.

I would suggest, since this is likely to be encounterd by users, rather
than just by programmers, that pppd be changed so that it will catch
invalid speeds in options, or the command line, and generate a helpful
error message.

Sending users to the tcsetattr man page to try to figure out why their pppd
options are not working is cruel.

Brad

Stephen B. Salai                            Phone (716) 325-5553
Cumpston & Shaw                             Fax    (716) 262-3906
Two State Street                            email bsalai@tmonline.com
Rochester, NY 14614