From owner-svn-src-head@freebsd.org Tue Aug 14 15:42:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B0E107BDCE for ; Tue, 14 Aug 2018 15:42:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E958375B46 for ; Tue, 14 Aug 2018 15:42:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id 72-v6so18790748itw.3 for ; Tue, 14 Aug 2018 08:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=p79t4qo/oCSpBeL4yB5lGhpe2BrdjAPNgqeJb3pAoOw=; b=TKTuq4TQJyF/Q7L6hUggbb4Y29WMxYquwvxIQL80I4wbHYz2OKWGn0GvfDYBOf5gbq T3iHyDZbRKoa9upeJt4kfTxVw/Md57MP3ru/dCOHawfiXjzOULQHISlbMvm/Psdm5Dt2 f5OZMjE7FAO49LIrjMkw299px+h2a2VSBX0Z+TKiQL2bABOSe9QsXIR5NMT0RJQKcxE6 xIhj9Xlbwo0D+xxK8o0Rt1rC1pnHPkk1rvB18KItr1ufdJ4h6ZJ94jIfiE+YTO8hCHUc W5UeuW8fv9fHR07qrdXZWaFIBRjxBRgAGhq8MdVMCUnA5nA4bViVbW3kpVvvkW/2HnyK 40AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=p79t4qo/oCSpBeL4yB5lGhpe2BrdjAPNgqeJb3pAoOw=; b=kxIEG2+cAcZeK1Wbj66aQ6a6sbHF6lK+4xwvhG1ItCAXyyXLwc6PV8JRGX/sXO1IXG ysBJ7IHulYjVwfUmipdMtJZk7qLem1etiEWGKkSDvenkGK5Pzy9Gpwj3meTeJyFDB0Sk AsdV2Q//DoCZI4JKYwxwFrK6ag6DtSiYVhdUqvrAOp71vkhREtPBrYZ0ZOM+5NqVTk7c XqSK0EZ+MN2LV3pDT9PdCAPLf6HFZYQ31ayZ6tnV6q4foVJjf5m33NXgFUnuUlwmdggQ ObsiZoGOuVY1tVvcFkhEFZ1+gYdihHNGrDNwJk5+WFnHC35fteHUk/OV8dBvPHSWJKlg WMhg== X-Gm-Message-State: AOUpUlGgbSsox3B12KV1WMa6nxIlVLOBBG38UarXe/75Lo2SvnQc6Zr2 DrXv6I4lQ4APsLzdijmvOQC3/UFMunuy1QVIfyNAxA== X-Google-Smtp-Source: AA+uWPyGaAnLJbdTopXhCpYD1yK4yJYdY7lEhyUbh61O+y0D5OSi5bh7ZJpIFHGqEKorfxF4LTOl8mCE5N5LgpHlgF0= X-Received: by 2002:a24:b211:: with SMTP id u17-v6mr14500736ite.1.1534261329260; Tue, 14 Aug 2018 08:42:09 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:381a:0:0:0:0:0 with HTTP; Tue, 14 Aug 2018 08:42:08 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <1534255137.31375.121.camel@freebsd.org> References: <201808141352.w7EDqA6F001954@repo.freebsd.org> <1534255137.31375.121.camel@freebsd.org> From: Warner Losh Date: Tue, 14 Aug 2018 09:42:08 -0600 X-Google-Sender-Auth: KmkX1MLypoG2bZhz3HnPmU7Rm24 Message-ID: Subject: Re: svn commit: r337750 - head/share/man/man4 To: Ian Lepore Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 15:42:10 -0000 On Tue, Aug 14, 2018 at 7:58 AM, Ian Lepore wrote: > On Tue, 2018-08-14 at 13:52 +0000, Warner Losh wrote: > > Author: imp > > Date: Tue Aug 14 13:52:10 2018 > > New Revision: 337750 > > URL: https://svnweb.freebsd.org/changeset/base/337750 > > > > Log: > > Add good description of init and lock devices from sio to uart. > > > > Modified: > > head/share/man/man4/uart.4 > > > > Modified: head/share/man/man4/uart.4 > > ===================================================================== > > ========= > > --- head/share/man/man4/uart.4 Tue Aug 14 13:52:08 2018 > > (r337749) > > +++ head/share/man/man4/uart.4 Tue Aug 14 13:52:10 2018 > > (r337750) > > @@ -225,6 +225,52 @@ Generally speaking, a connection to a DB-9 style > > conne > > level signal at up to 12 volts. > > A connection to header pins or an edge-connector on an embedded > > board > > is typically a TTL signal at 3.3 or 5 volts. > > +.Sh Special Devices > > +The > > +.Nm > > +driver also supports an initial-state and a lock-state control > > +device for each of the callin and the callout "data" devices. > > +The termios settings of a data device are copied > > +from those of the corresponding initial-state device > > +on first opens and are not inherited from previous opens. > > +Use > > +.Xr stty 1 > > +in the normal way on the initial-state devices to program > > +initial termios states suitable for your setup. > > +.Pp > > +The lock termios state acts as flags to disable changing > > +the termios state. > > +E.g., to lock a flag variable such as CRTSCTS, use > > +.Em stty crtscts > > +on the lock-state device. > > +Speeds and special characters > > +may be locked by setting the corresponding value in the lock-state > > +device to any nonzero value. > > +E.g., to lock a speed to 115200, use > > +.Dq Li stty 115200 > > +on the initial-state device and > > +.Dq Li stty 1 > > +on the lock-state device. > > +.Pp > > +Correct programs talking to correctly wired external devices > > +work with almost arbitrary initial states and almost no locking, > > +but other setups may benefit from changing some of the default > > +initial state and locking the state. > > +In particular, the initial states for non (POSIX) standard flags > > +should be set to suit the devices attached and may need to be > > +locked to prevent buggy programs from changing them. > > +E.g., CRTSCTS should be locked on for devices that support > > +RTS/CTS handshaking at all times and off for devices that do not > > +support it at all. > > +CLOCAL should be locked on for devices that do not support carrier. > > +HUPCL may be locked off if you do not > > +want to hang up for some reason. > > +In general, very bad things happen > > +if something is locked to the wrong state, and things should not > > +be locked for devices that support more than one setting. > > +The CLOCAL flag on callin ports should be locked off for logins > > +to avoid certain security holes, but this needs to be done by > > +getty if the callin port is used for anything else. > > .Sh FILES > > .Bl -tag -width "/dev/ttyu?.init" -compact > > .It Pa /dev/ttyu? > > > > Now they're documented together with a different single driver of many > that supports the feature. This is implemented in the tty layer and > applies to all serial drivers, shouldn't it be documented in tty(4)? Hmmm. You're right. I'd thought only uart supported it, but it looks like you're right it's down a layer. I'll move again and put a xref. Warner