Re: ppc fails to attach to puc on 9.1-STABLE, 7.4-STABLE works

Andre Albsmeier <[email protected]>
Newsgroups gmane.os.freebsd.devel.hardware
Message-ID <20130118173914.GA93921@bali>
On Fri, 18-Jan-2013 at 17:58:49 +0100, John Baldwin wrote:
> 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.

Well, in my despair (before the bug was fixed) I tried
also (and only):

hint.ppc.1.flags=0x2F

but this didn't work as well. If we want to dig into this,
I can plug another puc card in my desktop box (the other
one is sitting in a server where I don't want to do
experiments) and try to reproduce it here...

	-Andre

>  
> > 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

-- 
In a world without walls and fences, who needs windows and gates?
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.