From owner-freebsd-arch@FreeBSD.ORG Sun Jun 20 16:51:23 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C88F116A4CF for ; Sun, 20 Jun 2004 16:51:23 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E9D943D53 for ; Sun, 20 Jun 2004 16:51:23 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i5KGnwqR005537; Sun, 20 Jun 2004 10:49:58 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 20 Jun 2004 10:50:00 -0600 (MDT) Message-Id: <20040620.105000.106880101.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <82937.1087721102@critter.freebsd.dk> References: <20040619.145736.91276883.imp@bsdimp.com> <82937.1087721102@critter.freebsd.dk> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: [REVIEW] move tty lock/initial up in the stack X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 16:51:23 -0000 In message: <82937.1087721102@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In an ideal world the hardware driver would be reduced to just that, : a few simple primitives, "start", "config", "open", "close" and a : backcall "rint" with received data and modem status changes. This : is not too unlike what Marcel have done with uart(4) I guess I'm curious how the tty/cua split would be done in this scheme. Of course I'm reimplementing the Cyclades Z driver to try to use uart, which is why I'm getting curious. I don't know if this will wind up working or not, but since 95% of the hardware interface is two circular buffers in memory, which does seem to map mostly onto Marcel's model. Time will tell... I also have porting the stallion driver to current. I can do this by a simple hack on the old driver, or a rewrite. I'll use my Z experience to decide. : The major difference is that serial ports are rapidly headed into : the sunset whereas disks are very much a hot topic. I suspect that the decline will last for a long time. Many of the usb devices that I've seen are really usb to rs232 to thing, so I suspect that it is a case of 'Serial ports are dead, long live the serial ports' : The pty driver is the only really interesting tty driver these days : as most terminal access is through sshd, telnetd or xterm. There's still a lot of people using ppp for dialup connections, even in the day of broadband. I suspect that will be the other large area of heavy use. : Currently I see two ways to get ptys out form under giant: : : 1) write an entirely new pty driver which is totally separate : from the rest of the tty code (We don't need slip/ppp/netgraph : support on ptys anyway). : : 2) clean up the tty code enough that the pty can be deGiantized, : paving the road for the rest of the tty drivers to get the : same treatment, should somebody else care enough. Are you looking for help on the latter? : I havn't quite made up my mind yet, and have resorted to some general : polishing while I try to make sense of this stuff. To some extent I : already regret getting my fingers dirty over here. OK. Warner