NetBSD Problem Report #7179

Received: (qmail 27062 invoked from network); 17 Mar 1999 19:55:00 -0000
Message-Id: <199903171954.MAA00361@elephant.nervana.montana.edu>
Date: Wed, 17 Mar 1999 12:54:54 -0700 (MST)
From: "Elephant's Root" <root@elephant.nervana.montana.edu>
Reply-To: cjones@honors.montana.edu
To: gnats-bugs@gnats.netbsd.org
Subject: support for AVA-1505
X-Send-Pr-Version: 3.95

>Number:         7179
>Category:       kern
>Synopsis:       support for AVA-1505
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 17 12:05:00 +0000 1999
>Closed-Date:    Thu Apr 08 11:06:09 +0000 1999
>Last-Modified:  Thu Apr 08 11:07:00 +0000 1999
>Originator:     Chris Jones
>Release:        Roughly Mar. 7, 1999
>Organization:

>Environment:

System: NetBSD elephant.nervana.montana.edu 1.3K NetBSD 1.3K (ELEPHANT) #3: Wed Mar 17 12:17:41 MST 1999 root@elephant.nervana.montana.edu:/usr/src/sys/arch/i386/compile/ELEPHANT i386


>Description:
I recently bought an Adaptec AVA-1505, a low-end 16-bit SCSI card.  In
non-PNP mode, it appears to act just like an aic6360, assuming you get
the irq right.  It also appears to work with DMA enabled.  So we might
want to add an entry to GENERIC for i386:

aic1	at isa? port 0x140 irq 10 drq 5

The default settings for the card are actually port 0x140, irq 10, no
DMA.  So I don't know if we should leave the drq in there or not.  The
thing is, the only way to get the card out of isapnp mode is to run
SCSISelect (which comes with it), and you can set the drq from
SCSISelect.

Also, the card can work in isapnp mode.  The dmesg output I get says:
NetBSD 1.3K (ELEPHANT) #3: Wed Mar 17 12:17:41 MST 1999
    root@elephant.nervana.montana.edu:/usr/src/sys/arch/i386/compile/ELEPHANT
cpu0: Intel 486DX (486-class)
[...]
isapnp0: read port 0x203
isapnp0: <Adaptec AVA-1505A       , ADP1505, ADP1530, SCSI Controller> port 0x140/32 irq 9 not configured
[...]

I added ADP1505 to isapnpdevs, and it worked.  Should I have added
ADP1530 instead?

The thing is, the card is now detected twice, once by isa and once by
isapnp.  This happens whenever the card's IO address is the same as
what the isa attachment is looking for.  What is this a bug in?  I get
the same symptom with my ep0.

One more reminder:  This should probably be added to the list of
supported devices on the web page and in the install document.

>How-To-Repeat:
See above.
>Fix:
See above.
>Release-Note:
>Audit-Trail:

From: Matthias Drochner <drochner@zel459.zel.kfa-juelich.de>
To: cjones@honors.montana.edu
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/7179: support for AVA-1505 
Date: Fri, 19 Mar 1999 19:21:33 +0100

 I've added both the isapnp device id and the compatible
 id to "isapnpdevs".
 If all such cards are able to operate in ISApnp mode, things
 should be well and another "at isa?" entry is not needed.
 Do you know whether this is true?

 The double detection: In theory, this should not happen
 because an ISApnp reset command is issued before the ISA
 scan, so that ISApnp cards should not respond before
 the ISApnp specific awake has taken place.
 In praxis, this doesn't always work, in particular not
 with cards which are kind of "dual mode" (read: rubbish).

 The obvious workaround is to not have both in the config
 file, another possible way would be to sort them out in
 the driver's attach function (if there is a way to identify
 the card cleanly). On machines with ISApnp aware BIOS the
 mentioned reset could be avoided completely and the pnp
 cards probed before the rest of ISA, but this would be a
 major change.

 best regards
 Matthias




From: Chris Jones <cjones@rupert.honors.montana.edu>
To: M.Drochner@fz-juelich.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/7179: support for AVA-1505
Date: 19 Mar 1999 14:19:49 -0700

 >>>>> "MD" == Matthias Drochner <drochner@zel459.zel.kfa-juelich.de> writes:

 MD> I've added both the isapnp device id and the compatible id to
 MD> "isapnpdevs".  If all such cards are able to operate in ISApnp
 MD> mode, things should be well and another "at isa?" entry is not
 MD> needed.  Do you know whether this is true?

 I think it's true.  All I know for certain is that my card can do
 this.  Maybe we should just assume we've got it covered, until we hear
 differently.

 MD> The double detection: In theory, this should not happen because an
 MD> ISApnp reset command is issued before the ISA scan, so that ISApnp
 MD> cards should not respond before the ISApnp specific awake has
 MD> taken place.  In praxis, this doesn't always work, in particular
 MD> not with cards which are kind of "dual mode" (read: rubbish).

 MD> The obvious workaround is to not have both in the config file,
 MD> another possible way would be to sort them out in the driver's
 MD> attach function (if there is a way to identify the card
 MD> cleanly). On machines with ISApnp aware BIOS the mentioned reset
 MD> could be avoided completely and the pnp cards probed before the
 MD> rest of ISA, but this would be a major change.

 Should there be a driver-specific function which returns an opaque
 value which can be used as a "unique ID?"  Then some part of the
 autoconf code can configure ISA, then configure ISApnp, then compare
 the unique ID's and call unconfigure (or whatever) hooks where
 appropriate.  That sounds like a really gross hack, though.

 Maybe it should happen in the probe stage of autoconf.  So, probe
 everything on a given ISA bus, but don't attach anything.  Then probe
 everything on the corresponding isapnp bus.  Ask for unique ID's from
 the drivers, and compare them.  Then you can call the attach functions
 based on the unique ID's, and the match priorities returned from the
 probe stage.

 I guess if a given driver can't generate a unique ID, then you're no
 worse off than you were before, right?

 I don't really know anything about how our autoconf code works, so
 this could all probably be ignored.

 Anyway, that seems to fix this particular PR, so feel free to close
 it.  I can verify whether it works on Monday, so you could also wait
 until then if you want to.  Thanks!

 Chris

 -- 
 -----------------------------------------------------cjones@math.montana.edu
 Chris Jones                                          cjones@honors.montana.edu
            Mad scientist at large                    cjones@nervana.montana.edu
 "Is this going to be a stand-up programming session, sir, or another bug hunt?"

From: Chris Jones <cjones@rupert.honors.montana.edu>
To: M.Drochner@fz-juelich.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/7179: support for AVA-1505
Date: 04 Apr 1999 14:37:08 -0600

 The changes work, and the machine in question is now running a
 -current kernel.  Could you please close this PR?

 Thanks.

 Chris

 -- 
 -----------------------------------------------------cjones@math.montana.edu
 Chris Jones                                          cjones@honors.montana.edu
            Mad scientist at large                    cjones@nervana.montana.edu
 "Is this going to be a stand-up programming session, sir, or another bug hunt?"
State-Changed-From-To: open->closed 
State-Changed-By: drochner 
State-Changed-When: Thu Apr 8 04:06:09 PDT 1999 
State-Changed-Why:  
submitter confirmed that it works now 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.