Subject: Re: isapnp confusion (?)
To: None <thorpej@nas.nasa.gov>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-i386
Date: 07/18/1998 22:31:00
>  > Register configuration:
>  > io[0]: 0x534/0
>  > io[1]: 0x388/0
>  > io[2]: 0x220/0
>  > irq[0]: 5
>  > drq[0]: 1
>  > drq[1]: 0
>
> ...looks like this is because the routine that prints the info isn't
> actually using the same attach args as what is used to configure the
> device.  I suggest you pass `lpa' to the debug print functon.

Well, the existing code under DEBUG_ISAPNP tries to do:

                    (lpa = isapnp_bestconfig(sc, &ipa)) != NULL; d++) {
                        isapnp_write_reg(sc, ISAPNP_LOGICAL_DEV_NUM, d);
                        isapnp_configure(sc, lpa);
#ifdef DEBUG_ISAPNP
                        {
                                struct isapnp_attach_args pa;

                                isapnp_get_config(sc, &pa);
                                isapnp_print_config(&pa);
                        }
#endif

I presume this means that it's trying to get the config from the
card after it's been set by isapnp_configure() and print the result,
in which case I suppose it makes more sense to use the &pa instead
of &lpa.  Furthermore, it either looks like isapnp_get_config() does
not fetch the I/O sizes or the I/O range sizes can't be fetched (?)
back by the "get config" operation.  Oh, well.  Barking up the wrong
tree again, I guess.  Then I'm even more confused as to why I get
0x1 read back from port 0x534 after this mapping has been set up
(which I now presume it has been at the point where ad1848_probe()
gets called).

Sigh.

- Havard