Subject: Re: kern/2235: new config changes fail on mac68k port
To: None <paul@pgoyette.bdt.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: netbsd-bugs
Date: 03/18/1996 15:11:28
On Sun, 17 Mar 1996 15:04:15 -0800 (PST)
Paul Goyette <paul@pgoyette.bdt.com> wrote:
> >Synopsis: new config changes fail on mac68k port
> >Description:
> Get following messages when booting new kernel:
> ARGH!! No boot device????Only supports DISK device for booting.
> Changing root device to e.
> panic: cannot mount root
After a discussion with Scott Reynolds, I think I know what the problem
is, and quite frankly, I'm *very* surprised the drivers ever worked in
the first place!
Short version of the story: the mac68k "mainbus" driver uses "indirect
autoconfigration" to attach children. This changes the second argument
(the "match" argument) to the match/probe routines from a "struct cfdata *"
to a "struct device *" ... the ncr5380 drivers attach to mainbus on a mac.
HOWEVER! *BOTH* of the 5380 drivers were accessing the "match" argument
as a "struct cfdata *"! This, AFAICT, is how they've *always* worked,
and when they did the "cf->cf_unit == 0" check, they must have gotten
extremely lucky and just happened to read something that had a value of 0.
I "fixed" the 5380 drivers (read: made them cope with "indirect") and
sent Scott patches this morning. I assume that he'll test them tonight
and check them in if they work. If anyone else wants these patches in
the mean time, contact me privately.
BTW, this is a shining example of how the "indirect" hack can screw
people up, and why we should fix all of the drivers that rely on it and
nuke if from orbit.
--------------------------------------------------------------------------
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939