From owner-freebsd-hardware@FreeBSD.ORG Fri Jan 18 17:13:17 2013 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 76BE1475 for ; Fri, 18 Jan 2013 17:13:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5455388E for ; Fri, 18 Jan 2013 17:13:17 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B9599B9A4; Fri, 18 Jan 2013 12:13:16 -0500 (EST) From: John Baldwin To: Bruce Evans Subject: Re: ppc fails to attach to puc on 9.1-STABLE, 7.4-STABLE works Date: Fri, 18 Jan 2013 11:58:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <20130110074052.GA8922@bali> <201301171337.56851.jhb@freebsd.org> <20130118184242.Q1470@besplex.bde.org> In-Reply-To: <20130118184242.Q1470@besplex.bde.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201301181158.50048.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 18 Jan 2013 12:13:16 -0500 (EST) Cc: "freebsd-hardware@freebsd.org" X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2013 17:13:17 -0000 On Friday, January 18, 2013 3:05:53 am Bruce Evans wrote: > On Thu, 17 Jan 2013, John Baldwin wrote: > > > On Wednesday, January 16, 2013 10:10:34 pm Bruce Evans wrote: > >> On Wed, 16 Jan 2013, Andre Albsmeier wrote: > >> > >>> On Tue, 15-Jan-2013 at 21:27:07 +0100, John Baldwin wrote: > > >>>>> [reading flags in the driver] > >>>> This should not be needed for "flags". Look for 'devflags' in > >>>> sys/kern/subr_bus.c. The kernel always reads the current 'flags' hint during > >>>> device probe and stores them in dev->devflags and leaves them there after a > >>>> successful probe (so they should be seen by attach). Specifically, note: > >>>> > >>>> /* Set the winning driver, devclass, and flags. */ > >> > >> So the flags interface is unusable before some driver "wins". > > > > No, we set it twice. Specifically, it is set before each probe, then it is > > set again after a winning driver is chosen so that the proper flags exist > > during attach as well. > > Why didn't it work for Andre then? In followup e-mail he said it did work. The one reason it might not have worked before is that if he did 'ppc.0.at=foo' and that forced the ppc device to be ppc1 instead of ppc0 in which case the ppc0 flags wouldn't have applied. > It might be a layering problem, with the flags not working because the > hint says that they are for ppc but the bus name being puc. I thought > that this problem was fixed. In FreeBSD-~5.2, I had to add flags > reading to sio_pci.c and sio_puc.c to get flags for sio actually seen > by sio when the bus is not isa. subr_bus.c does the 2 settings of the > flags much the same in FreeBSD-~5.2, but this certainly doesn't work. I don't know off hand. :( -- John Baldwin