Subject: Re: Removing __BROKEN_CONFIG_UNIT_USAGE
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 07/17/2007 00:19:12
--yq2ad9TzNXzcxitU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 16, 2007 at 10:34:32PM +0200, Matthias Drochner wrote:
>=20
> Looks well so far, just a minor nit:
>=20
> cube@cubidou.net said:
> > +xy0 at xyc0 drive 0
> > +xy1 at xyc0 drive 1
> > +xy2 at xyc1 drive 2
> > +xy3 at xyc1 drive 3=20
>=20
> 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=20

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

> > +	for (xa.driveno =3D 0, locs[XDC_DRIVE] =3D 0; xa.driveno < XDC_MAXDEV;
> > +	    xa.driveno++, locs[XDC_DRIVE]++)
> > +		(void) config_found_sm_loc(self, "xdc", (void *) &xa,
> > +		    xdc_print, config_stdsubmatch);
>=20
> 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.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--yq2ad9TzNXzcxitU
Content-Type: application/pgp-signature
Content-Disposition: inline

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

--yq2ad9TzNXzcxitU--