Date: Tue, 20 Apr 1999 17:26:46 +0800 From: Peter Wemm <peter@netplex.com.au> To: Doug Rabson <dfr@nlsystems.com> Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/isa isa_compat.c Message-ID: <19990420092648.F07421F63@spinner.netplex.com.au> In-Reply-To: Your message of "Tue, 20 Apr 1999 10:15:24 %2B0100." <Pine.BSF.4.05.9904201014440.85882-100000@herring.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Rabson wrote:
> On Mon, 19 Apr 1999, Peter Wemm wrote:
>
> > peter 1999/04/19 13:31:55 PDT
> >
> > Modified files:
> > sys/i386/isa isa_compat.c
> > Log:
> > Always reset the isa hints after releasing the resources after probe,
> > because the act of doing the release kills the hints(!). A quirk of
> > the wrapper caused it to reset all the settings, except perhaps for the
> > memory address. I've tested this with a real SMC 8013EPC - which uses
> > shared memory addresses - it seems to work OK.
>
> I can't think why isa.c resets the hints on release. This should be
> removed (probably).
I think it's just an overloading of the alloc/release storage.
On allocation:
switch (type) {
case SYS_RES_IRQ:
if (isdefault && id->id_irq[0] >= 0) {
start = id->id_irq[0]; /* get hint */
end = id->id_irq[0];
count = 1;
}
if (id)
rvp = &id->id_irqres[*rid];
break;
[..]
On release:
switch (type) {
case SYS_RES_IRQ:
id->id_irqres[rid] = 0;
id->id_irq[rid] = -1; /* <<< clear hint here */
break;
So, on release, we're clearing the space used by the 'hints'.
I think the following lines should probably go from the release section:
id->id_irq[rid] = -1;
id->id_drq[rid] = -1;
id->id_msize[rid] = 0;
id->id_maddr[rid] = 0;
id->id_port[rid] = 0;
id->id_portsize[rid] = 0;
The other alternative is to store the 'defaults' in a seperate location to
the place we track the allocated resources. IMHO, that would be better
so that we can see if a programmable card has chosen something different
than what was hinted at.
Cheers,
-Peter
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990420092648.F07421F63>
