From owner-freebsd-current@FreeBSD.ORG Tue Dec 13 18:01:43 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F3AE16A41F; Tue, 13 Dec 2005 18:01:43 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BCBA43D55; Tue, 13 Dec 2005 18:00:59 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from buffy.york.ac.uk (buffy-128.york.ac.uk [144.32.128.160]) by mail-gw1.york.ac.uk (8.12.10/8.12.10) with ESMTP id jBDI0tNW013649; Tue, 13 Dec 2005 18:00:55 GMT Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.13.4/8.13.4) with ESMTP id jBDI0sIo021607; Tue, 13 Dec 2005 18:00:54 GMT (envelope-from gavin.atkinson@ury.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.13.4/8.13.4/Submit) id jBDI0sun021606; Tue, 13 Dec 2005 18:00:54 GMT (envelope-from gavin.atkinson@ury.york.ac.uk) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin.atkinson@ury.york.ac.uk using -f From: Gavin Atkinson To: John Baldwin In-Reply-To: <200512131101.44375.jhb@freebsd.org> References: <20051211181324.G71610@ury.york.ac.uk> <1134481135.15730.76.camel@buffy.york.ac.uk> <1134485368.15730.95.camel@buffy.york.ac.uk> <200512131101.44375.jhb@freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 13 Dec 2005 18:00:53 +0000 Message-Id: <1134496853.15730.118.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin.atkinson@ury.york.ac.uk Cc: freebsd-current@freebsd.org, imp@freebsd.org, Gleb Smirnoff Subject: Re: puc fails to attach serial ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 18:01:43 -0000 On Tue, 2005-12-13 at 11:01 -0500, John Baldwin wrote: > > OK, I've cracked what's happening. Indeed we are somehow missing a call > > to devclass_add_driver(9). I was loading puc as a module, and in that > > case the following relevant calls to devclass_add_driver are made: > > > Because sio(4) only includes sio_puc.c in the kernel if you have 'puc' in your > kernel config, and the puc kernel module only includes the puc files, it > doesn't include sio_puc.c and ppc_puc.c. uart has the same issue as well. > Looking at the three attachments, there's no reason for them to be dependent > on puc, they don't actually call any symbols in the puc(4) kernel module > itself, so they can be compiled into kernels w/o puc without causing any > harm. Then loading puc as a module would work. Here's a patch: Thanks! I can confirm that this patch fixes the problem I was seeing. I understand David O'Brien's concerns about the patch and associated increase in kernel size, but as it stands, there seems to be little point in creating a puc module as it cannot work with the GENERIC kernel (other than for devices using uart, as that isn't in GENERIC). Gavin