Subject: Re: AE memory size
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: John Ruschmeyer <jruschme@mac.com>
List: port-mac68k
Date: 09/22/2001 18:43:56
> From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
> Date: Sat, 22 Sep 2001 18:49:52 +0200
>=20
> At 19:15 Uhr +0200 21.9.2001, Henry B. Hotz wrote:
>> At 11:21 AM -0400 9/21/01, John Ruschmeyer wrote:
>>> One minor issue, though, according to the Macsense website, this card h=
as
>>> 64k of onboard memory. The ae probe, however, only sizes the card at 16=
k. In
>>> looking at the memory sizing code, it appears that we do not even test =
for
>>> cards having more than 32k of onboard memory. Is there a reason for thi=
s? Or
>>> did the original author of the ae driver assume it could never happen?
>>=20
>> Email Allen Briggs if you can't find it, but there was a patch posted
>> a year or two ago to fix this.  I thought it would be in the main
>> deliveries by now.  The reason was simply a shortage of debugging
>> time for the original author and a (probably spurious) appearance of
>> a problem with probing larger size memories.
>=20
> Funny you should mention it... I was just about to build a custom 1.5.2
> kernel and patch if_ae.c when I came across your mail.
>=20
>=20
> Diffs against 1.5.2:
>=20
> Index: if_ae.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/syssrc/sys/arch/mac68k/dev/if_ae.c,v
> retrieving revision 1.67.26.2
> diff -u -u -r1.67.26.2 if_ae.c
> --- if_ae.c 2000/09/14 06:35:16 1.67.26.2
> +++ if_ae.c 2001/09/22 16:01:46
> @@ -37,7 +37,7 @@
> bus_space_handle_t bsh;
> int ofs;
> {
> - int i1, i2, i3, i4;
> + int i1, i2, i3, i4, i8;
>=20
> /*
> * banks; also assume it will generally mirror in upper banks
> @@ -47,11 +47,20 @@
> i2 =3D (8192 * 1);
> i3 =3D (8192 * 2);
> i4 =3D (8192 * 3);
> + i8 =3D (8192 * 7);
>=20
> bus_space_write_2(bst, bsh, ofs + i1, 0x1111);
> bus_space_write_2(bst, bsh, ofs + i2, 0x2222);
> bus_space_write_2(bst, bsh, ofs + i3, 0x3333);
> bus_space_write_2(bst, bsh, ofs + i4, 0x4444);
> + bus_space_write_2(bst, bsh, ofs + i8, 0x8888);
> +
> + if (bus_space_read_2(bst, bsh, ofs + i1) =3D=3D 0x1111 &&
> +     bus_space_read_2(bst, bsh, ofs + i2) =3D=3D 0x2222 &&
> +     bus_space_read_2(bst, bsh, ofs + i3) =3D=3D 0x3333 &&
> +     bus_space_read_2(bst, bsh, ofs + i4) =3D=3D 0x4444 &&
> +     bus_space_read_2(bst, bsh, ofs + i8) =3D=3D 0x8888)
> +  return 8192 * 8;
>=20
> if (bus_space_read_2(bst, bsh, ofs + i1) =3D=3D 0x1111 &&
> bus_space_read_2(bst, bsh, ofs + i2) =3D=3D 0x2222 &&
>=20
> Back then, Allen suspected problems with cards that have fragmented buffe=
r
> memory. I have no such card, only some very old fullsize 3COM cards and a=
n
> Asant=E9 card in my SE/30 which all have 16K and run fine with the patch.

One thing, the patch seems to omit the extra testing required if the card
has <64K but mirrors memory from unavailable banks.

<<<John>>>