From owner-freebsd-hackers Sat Jul 22 23:46:42 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id XAA22171 for hackers-outgoing; Sat, 22 Jul 1995 23:46:42 -0700 Received: from sequent.kiae.su (sequent.kiae.su [144.206.136.6]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id XAA22164 for ; Sat, 22 Jul 1995 23:46:37 -0700 Received: by sequent.kiae.su id AA08393 (5.65.kiae-2 ); Sun, 23 Jul 1995 10:45:04 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Sun, 23 Jul 95 10:45:04 +0400 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id KAA00296; Sun, 23 Jul 1995 10:39:07 +0400 To: Terry Lambert Cc: bde@zeta.org.au, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu References: <9507230530.AA24940@cs.weber.edu> In-Reply-To: <9507230530.AA24940@cs.weber.edu>; from Terry Lambert at Sat, 22 Jul 95 23:30:05 MDT Message-Id: Organization: Olahm Ha-Yetzirah Date: Sun, 23 Jul 1995 10:39:06 +0400 (MSD) X-Mailer: Mail/@ [v2.40 FreeBSD] From: =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= aka "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: Re: dial up at > 9600 baud Lines: 42 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1878 Sender: hackers-owner@freebsd.org Precedence: bulk In message <9507230530.AA24940@cs.weber.edu> Terry Lambert writes: >> >PPP always connected at 9600 baud. Found that in getty.c the open() function >> >blocks until carrier detected. This happens before the port is set up using >> >the getty args. Changed getty to use non-blocking open(), then fall through >> >to set up the port with getty args, and then wait for carrier using ioctl() >> >similar to slattach. See attached diff file for getty.c in FreeBSD 2.0.5. >> >> I don't think, that waiting for carrier is right way. >> Better way will be to open device as non-blocked, >> then setup all tty flags (incl. speed), then reopen device >> in blocked mode just before reading anything. >> >> BTW, Bruce, is it possible now to switch to blocked >> mode without reopening? >No, it's not possible, since we are talking about whether the open flag >is set or not for subsequent opens. >The reason the ioctl() loses is taht it will prevent bidirection use >of the port, with the getty open always having succeeded. >I don't think I quite understand why the previous behaviour was a >problem in the first place -- perhas the original poster could explain >the rationale for his changes a bit better? The problem: initial port speed 9600, getty speed 38400 f.e., port opened on carrier at 9600, modem detects it and set connection to 9600 too, _then_ getty change port speed to 38400 confusing modem completely. I understand that problem solves by locking port on 38400 initially, but it isn't nice solution, getty must able to open port at correct speed setted in its flags. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849