From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 24 18:22:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADCAB1065672; Sat, 24 Apr 2010 18:22:38 +0000 (UTC) (envelope-from tedm@mittelstaedt.us) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id 533328FC12; Sat, 24 Apr 2010 18:22:38 +0000 (UTC) Received: from [192.168.1.202] (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) by mail.freebsd-corp-net-guide.com (8.14.3/8.14.3) with ESMTP id o3OIMYjC028160; Sat, 24 Apr 2010 11:22:35 -0700 (PDT) (envelope-from tedm@mittelstaedt.us) Message-ID: <4BD336E9.5070007@mittelstaedt.us> Date: Sat, 24 Apr 2010 11:22:33 -0700 From: Ted Mittelstaedt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: "M. Warner Losh" References: <4BD22CD0.7030407@mittelstaedt.us> <20100424102255.12d782f8@ernst.jennejohn.org> <20100424.092938.1125510371197586607.imp@bsdimp.com> In-Reply-To: <20100424.092938.1125510371197586607.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (mail.freebsd-corp-net-guide.com [65.75.192.90]); Sat, 24 Apr 2010 11:22:35 -0700 (PDT) X-Mailman-Approved-At: Sat, 24 Apr 2010 18:30:34 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-drivers@freebsd.org Subject: Re: What tty changes - question on porting ltmdm and hcfmdm to FreeBSD 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2010 18:22:38 -0000 On 4/24/2010 8:29 AM, M. Warner Losh wrote: > In message:<20100424102255.12d782f8@ernst.jennejohn.org> > Gary Jennejohn writes: > : On Fri, 23 Apr 2010 16:27:12 -0700 > : Ted Mittelstaedt wrote: > : > :> Setting aside the question of why do we break software that a lot of > :> people use > :> (these chips are in use on a lot of laptops) is there a document > :> somewhere that explains > :> what changes need to be made in code for this new tty setup? Or, is > :> there a set > :> of magic include files or a "conversion shim" library that will allow > :> these kinds > :> of programs to build without much work? > :> > :> Or is porting these drivers just so non-trivial that the only way is > :> to just delve into > :> the system manuals and delve into the driver code and try to figure out > :> what is > :> going on in each? If that's the case that's probably beyond my ability > :> but I'd > :> be happy to serve as a testbed. > :> > : > : The guy to ask about this would be Ed Schouten (ed@). AFAICR he did the new > : TTY stuff. I don't know whether he reads these lists. > : > : AFAIK there is no easy way to fix this and there are no backwards compati- > : bilty shims or magic header files. > : > : The fundamental problem with ltmdm is that it's a KLD and has to grovel > : around in the guts of the kernel. That makes fixing it decidely non- > : trivial. > > The fundamental reason that things changed was due to the locking of > the TTY layer. These things change over time, and the old APIs made > it very difficult to lock without driver visible changes. > > Warner > I mailed Ed and his response is to look at the changelog of sys/dev/uart/uart_tty.c for an idea of how to rewrite the driver, so I will take a look there. The ltmdm driver was updated in 2008 for an early version of FreeBSD 8, before the TTY layer changes went in, so that's where I'll start. Ted