From owner-freebsd-current@FreeBSD.ORG Mon Apr 7 21:19:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 840D037B401 for ; Mon, 7 Apr 2003 21:19:52 -0700 (PDT) Received: from hak.cnd.mcgill.ca (hak.cnd.mcgill.ca [132.216.11.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A2C143F3F for ; Mon, 7 Apr 2003 21:19:51 -0700 (PDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: from hak.cnd.mcgill.ca (localhost.cnd.mcgill.ca [127.0.0.1]) by hak.cnd.mcgill.ca (8.12.3p2/8.12.3) with ESMTP id h384M4qC048697; Tue, 8 Apr 2003 00:22:04 -0400 (EDT) (envelope-from mat@hak.cnd.mcgill.ca) Received: (from mat@localhost) by hak.cnd.mcgill.ca (8.12.3p2/8.12.3/Submit) id h384M2Q8048696; Tue, 8 Apr 2003 00:22:02 -0400 (EDT) Date: Tue, 8 Apr 2003 00:22:02 -0400 From: Mathew Kanner To: "M. Warner Losh" Message-ID: <20030408042202.GS17533@cnd.mcgill.ca> References: <20030406164134.GN17533@cnd.mcgill.ca> <20030407.000118.68039554.imp@bsdimp.com> <20030407064749.GO17533@cnd.mcgill.ca> <20030407.011258.62370040.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030407.011258.62370040.imp@bsdimp.com> Organization: I speak for myself, operating in Montreal, CANADA User-Agent: Mutt/1.5.3i cc: freebsd-current@freebsd.org Subject: Re: midi problem, an isa device on a pci card X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2003 04:19:52 -0000 First, in regards to your comments to Terry, indeed you are right, it's just a simple on-board soundchip, no dma for the mpu, no fancy bridges that I know of. On Apr 07, M. Warner Losh wrote: > [... trimmed ...] > : > You have to make them be full pci devices. > : > Hweover, this > : > is relatively easy to do. You hacks will just not work. > : > : But it's an ISA device on on a pci card. > > that's not possible. It is *NOT* an ISA device unless it is on a card > that has ISA fingers on it. Otherwise it *IS* a PCI device. Does the > pci card have a PCI to ISA bridge on it? If not, then you have to > deal with it as a PCI bus. I learned my lesson in math class not to argue from instinct alone, so I accept that what you are saying is the truth and try to make it hang off the pci device. Does your gut say I can bus_bus_alloc_resource in the pci driver and do port io given that I could from the isa driver? Will it catch overlap from the pci and isa busses? (suppose I really had an isa pnp mpu card and this pci card both wanting ports 0x300-0x302) I had a look at the netbsd code and they can say stuff like this is a config file: mpu at isa? mpu at somesoundcard? I hope my mpu code doesn't need to know about particular soundcards, like DRIVER_MODULE(mpu, snd_cmi,...) DRIVER_MODULE(mpu, snd_visamstrcrd,...) Incidentally, what about vga and joysticks for that matter? Not isa, but isa drivers. > [...more snips...] > You likely need to attach the mpu device to the pci soundcard in some > way, or if the pci device has its own function, directly to the pci > device. Chances are excellent that's what the interrupt problem you > are encountering are. Not an interrupt problem. Looking at code for other OSes, it doesn't seem like anybody has interrupts for tx ready for mpu401s. I dug out my other soundcard and the older midi driver that I did a few months ago and it now has the exact same problem of blasting the stuff too fast. I can only assume something has changed in the synth timer code (unlikely), or the general freebsd timer code in last few months. Thank you very much for your comments. --Mat > > Warner -- Brain: Pinky, are you pondering what I'm pondering? Pinky: I think so Brain, but pants with horizontal stripes make me look chubby.