From owner-cvs-all Tue Apr 20 2:29:22 1999 Delivered-To: cvs-all@freebsd.org Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (Postfix) with ESMTP id 2535414D9E; Tue, 20 Apr 1999 02:29:16 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (Postfix) with ESMTP id F07421F63; Tue, 20 Apr 1999 17:26:47 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Doug Rabson Cc: cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/isa isa_compat.c In-reply-to: Your message of "Tue, 20 Apr 1999 10:15:24 +0100." Date: Tue, 20 Apr 1999 17:26:46 +0800 From: Peter Wemm Message-Id: <19990420092648.F07421F63@spinner.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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