Re: Adaptec 1542 and kernel 2.2.11&12 not working?

Chris D. Faulhaber (jedgar@fxp.org)
Sat, 11 Sep 1999 11:19:46 -0400 (EDT)


On Sat, 11 Sep 1999 Andries.Brouwer@cwi.nl wrote:

>
> tommiy@ozemail.com.au writes:
>
> : I have an old aha1542 card thats driving a sony dat drive, with all the
> : scsi options set for module and under kernel 2.2.9 everything works
> : fine.
> : However, if I use kernel 2.2.11 or 2.2.12 then it will not find the
> : scsi card at boot time and I cannot convince it to find it at all using
> : modprobe or insmod.
> I am not surprised - patch-2.2.11 contains a very strange patch
> on aha1542.c by Chris Faulhaber. Maybe it somehow was munged.
> Anyway, the easiest is to just revert it.
>

Thank you for the insult. I appreciate that considering I've never been
in contact with you.

> (Let us look at the patch:
>
> +#ifdef MODULE
> + bases[0] = 4;
> + bases[1] = aha1542[0];
> + bases[2] = aha1542[1];
> + bases[3] = aha1542[2];
> + bases[4] = aha1542[3];
> +#endif
>
> and the declaration of bases:
>
> #define MAXBOARDS 2
> static unsigned int bases[MAXBOARDS]={0x330, 0x334};
>

Yeah, that was just an initial [second] quick hack...it appears that the
wrong version got patched in (ver 2, not 3).

> So, it seems this will scribble on memory past bases.
> Also: bases[] contains the addresses being probed for.
> But the patch has
>
> +#if defined(MODULE)
> +int aha1542[] = { 0x330, 11, 4, -1 };
> +MODULE_PARM(aha1542, "1-4i");
> +#endif
>
> numbers that do not look like bases at all.
> Maybe this was copied from some other driver and happened to do
> what the patcher wanted?)

That is correct...the bases[x]= above is not...

My intention was to put the insmod variables into bases[0],
setup_buson[0], setup_busoff[0], and setup_dmaspeed[0] so it would be
probed first...and if no variables, the above values (aha1542[] = { 0x330,
11, 4, -1 }) would be default.

-----
Chris D. Faulhaber <jedgar@fxp.org> | All the true gurus I've met never
System/Network Administrator, | claimed they were one and always
Reality Check Information, Inc. | pointed to someone better.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/