From owner-freebsd-hardware@FreeBSD.ORG Fri Jan 18 08:06:00 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 EAAF7F51; Fri, 18 Jan 2013 08:06:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 89E6E32A; Fri, 18 Jan 2013 08:05:56 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r0I85r97018316 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 19:05:55 +1100 Date: Fri, 18 Jan 2013 19:05:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: ppc fails to attach to puc on 9.1-STABLE, 7.4-STABLE works In-Reply-To: <201301171337.56851.jhb@freebsd.org> Message-ID: <20130118184242.Q1470@besplex.bde.org> References: <20130110074052.GA8922@bali> <20130116163342.GA30733@bali> <20130117134523.K1345@besplex.bde.org> <201301171337.56851.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Zty1sKHG c=1 sm=1 a=_UANyrYDgloA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=D2UiwzQrqZMA:10 a=S3IBTVES4DInHFQ1o40A:9 a=CjuIK1q_8ugA:10 a=qZsCKa-0RAXQNNg1:21 a=ph4GaHcx3gN3oOQx:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 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 08:06:01 -0000 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? 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. Bruce