Date: Fri, 18 Jan 2013 19:05:53 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: John Baldwin <jhb@FreeBSD.org> Cc: "freebsd-hardware@freebsd.org" <freebsd-hardware@FreeBSD.org> Subject: Re: ppc fails to attach to puc on 9.1-STABLE, 7.4-STABLE works Message-ID: <20130118184242.Q1470@besplex.bde.org> In-Reply-To: <201301171337.56851.jhb@freebsd.org> References: <20130110074052.GA8922@bali> <20130116163342.GA30733@bali> <20130117134523.K1345@besplex.bde.org> <201301171337.56851.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130118184242.Q1470>
