Re: Removing __BROKEN_CONFIG_UNIT_USAGE

Quentin Garnier <[email protected]> Tue, 17 Jul 2007 00:19:12 +0200
Newsgroups gmane.os.netbsd.ports.sun3,gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Mon, Jul 16, 2007 at 10:34:32PM +0200, Matthias Drochner wrote:
> 
> Looks well so far, just a minor nit:
> 
> [email protected] said:
> > +xy0 at xyc0 drive 0
> > +xy1 at xyc0 drive 1
> > +xy2 at xyc1 drive 2
> > +xy3 at xyc1 drive 3 
> 
> The drive number should be a locator which is local
> to the parent instance. Probably:
> xy0 at xyc0 drive 0
> xy1 at xyc0 drive 1
> xy2 at xyc1 drive 0
> xy3 at xyc1 drive 1 

Yes, should.  It means more changes to the driver though :)

> > +	for (xa.driveno = 0, locs[XDC_DRIVE] = 0; xa.driveno < XDC_MAXDEV;
> > +	    xa.driveno++, locs[XDC_DRIVE]++)
> > +		(void) config_found_sm_loc(self, "xdc", (void *) &xa,
> > +		    xdc_print, config_stdsubmatch);
> 
> It should only report the drive number(s) relatively to the local bus.
> Didn't look too closely, and don't know the hardware. As it looks
> there are at most 2 drivers per controller, but it doesn't know which
> if them are present. So I'd assume a loop from 0 to 1 would do it.
> XDC_MAXDEV should die.

Well, at the point the better is probably to make it so the numbering of
the units doesn't necessarily have to be that way (i.e., 0 must map to
[0,0], etc.).  Again, larger, more intrusive change.

-- 
Quentin Garnier - [email protected] - [email protected]
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.
signature.asc (application/pgp-signature, 478 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRpvu4NgoQloHrPnoAQJHqwf+IzPS1jwEmhY2haJpV7RlTwKVhDX2jyOx
bQ5ZSRWZCzGz2UfuQrOYGcjvVp5p4+6fdNHcvCnzCwBaRB+rNOeX3qHmq1tbUSv7
jD0EPGsklyEWUT0adoMunIHfK2LatSkzsWYXaHK1XNZWUojp7205yB3PBIWs7nSV
bd9w/3XU1TJKhy6GBkHYsAL59/8qsOsc2DfN8FvbuYSh+BgWH03iQ1OzoKMGW+S0
1bRtGpRcXl18f+Q6wiE8sKlSLBo/12/zK18IvxisTUP9fKXrrQHojpALBnVy/Dkw
Uvxr5P4gOS0lfv1wYAoYBByan2czBiF0t+8BHSPgqMio5jfSriy1NA==
=vhua
-----END PGP SIGNATURE-----