Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jan 2000 21:45:43 -0500 (EST)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        Warner Losh <imp@village.org>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: aha question
Message-ID:  <Pine.BSF.4.21.0001202137180.462-100000@sasami.jurai.net>
In-Reply-To: <200001210222.TAA07743@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 20 Jan 2000, Warner Losh wrote:
> How important is hard wiring a aha device?  I'm reworking the aha
> driver to support probing for the self identification and to better
> support plug and play.  In order to do this, I have created an
> identify routine which scans all the devices in the traditional self
> probing order and adds device children as needed.  The only problem
> with this that I can see is that it destroys the ability to hardwire
> aha instances to unit numbers in the config file.  While no pci
> drivers support this, and the isa ep driver provide strong evidence
> that I don't need to support this, I thought I'd ask here.

Well, I'd argue that you don't need to support hardwired devices but thats
only because I was too lazy to properly solve the possible contentions b/t
devices found in the IDENTIFY and devices hardcoded and provided by the
ISA hint mechanism.

Basically, inside the loop of your IDENTIFY method you'll need something
like this:

while (find_cards) {
	found = look_for_card(address);
	if (found) {
		err = devclass_get_devices(devclass, &listp, &count);
		if (!err & count)
			for (i = 0; i < count; i++) {
				bus_get_resource(listp[i], SYS_RES_IOPORT,
						 0, &io_start, &io_count);
				if (io_start == address) {
					/* cleanup listp etc */
					/* "He says they've already got one! */
					continue;
				}
			}
	}

}

> Also, if I need to support this, how would I go about doing that?

Like above.  :)

Good luck; if you implement this we should probably think about
generalizing it so everyone can use it.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| winter@jurai.net |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0001202137180.462-100000>