Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 1998 22:09:37 GMT
From:      gfm@mira.net (Graham Menhennitt)
To:        "Justin T. Gibbs" <gibbs@narnia.plutotech.com>, freebsd-current@FreeBSD.ORG
Subject:   Re: 3.0-CURRENT: Adaptec 1540 not detected (with workaround)
Message-ID:  <3648b287.87315503@mira.net>
In-Reply-To: <199811100058.RAA22604@narnia.plutotech.com>
References:  <199811100058.RAA22604@narnia.plutotech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ok, I did a bit more investigating. Firstly, I pulled the card out of the
machine. It's an AHA 1542B.

Then I added a printf to output the board id and the status value read from
the geometry register. The values were 0x41 and 0xFF respectively. Hang
on... with those values, the test should pass!!! I did a bit more fiddling
and found that putting in the printf makes it work! It must be a timing
problem. Sure enough, I added a delay loop before reading the geometry
register and it fixed it. I forgot to generate a patch file but it now
looks like:

	if (aha->boardid <= 0x42) {
		int dummy;
		for(dummy = 0; dummy < 1000; dummy++)
			;
		status = aha_inb(aha, GEOMETRY_REG);
		if (status != 0xff)
			return (ENXIO);
	}

I tried 100 for the loop count but it still failed.

I don't know if there is a more elegant way of doing this. But anyway, the
above seems to work 100% reliably.

Could somebody please commit this change.

Graham


On Mon, 9 Nov 1998 17:58:30 -0700 (MST), you wrote:

>In article <36484fb6.262608561@mira.net> you wrote:
>> Eventually I found the problem. In /usr/src/sys/dev/aha/aha.c there is some
>> code that attempts to distinguish between Adaptec and Buslogic adaptors.
>> This was failing. I'm not sure what model my adaptor is (I think it's an
>> 'A') but it is a genuine Adaptec. Hence the comment in the code about
>> cloned cards may apply to some genuine ones also.
>
>
>Can you print out the value of aha->boardid and send it to me?  It
>would also be useful for you to look in your machine and determine
>exactly which version of this card you have.
>
>Thanks,
>Justin


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3648b287.87315503>