From owner-freebsd-current@FreeBSD.ORG Mon Apr 7 04:26:56 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 AD99937B404 for ; Mon, 7 Apr 2003 04:26:56 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C5C843FBD for ; Mon, 7 Apr 2003 04:26:56 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0041.cvx22-bradley.dialup.earthlink.net ([209.179.198.41] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 192Uly-0006pq-00; Mon, 07 Apr 2003 04:26:47 -0700 Message-ID: <3E916024.9D7E77C6@mindspring.com> Date: Mon, 07 Apr 2003 04:25:24 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "M. Warner Losh" References: <20030406164134.GN17533@cnd.mcgill.ca> <20030407.000118.68039554.imp@bsdimp.com> <20030407.011258.62370040.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a45db47cf661b9e1b47c3afcbe00f9f6c73ca473d225a0f487350badd9bab72f9c350badd9bab72f9c 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: Mon, 07 Apr 2003 11:26:57 -0000 "M. Warner Losh" wrote: > In message: <20030407064749.GO17533@cnd.mcgill.ca> > Mathew Kanner writes: > : On Apr 07, M. Warner Losh wrote: > : > You can't create ISA devices that are parented to the pci bus. You > : > just can't. > : > : I don't understand your comment, isn't the newly created > : devices parent the (first) ISA bus? I scan for the isa class, get > : device instances and create from there. > > I'm saying that what you are doing isn't right and won't work too > well. If the device is on the pci bus, you have to create a pci > attachment. [ ... ] > : 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 think this is what he means: yes, there's a PCI-ISA bridge on the card, with an ISA device hung off the ISA side of the bridge. I remember that there were 1-ISA-device-PCI-ISA bridges when PCI first came out; this is probably one of them. His issue has got to be that you can't treat this as a normal PCI card, and have it "just work", because there's a 24 bit limit on the DMA addresses. This basically boils down to a "how do I get bounce buffers for an address space limited PCI card, if I am pretending it's a ``pure PCI'' device"? I think there's also a sub-issue; in his next-to-last post, he sort of implied (but didn't come right out and say) that the bridge driver itself gets probed and attached by the system, which then sees an ISA bus there. This could be problematic for him, since I don't think he wants to have to grab the card as PCI, and then write his own bridge chipset code (maybe he does, and I just missed it...). I think it would probably be a mistake to end up with multiple drivers for bridge chipsets, depending on whether or not they are on the motherboard or on a PCI card. Worst case, you have a box full of PCI cards whose function is to provide PCI-ISA bridges for ISA devices (serial ports, whatever), and every one of them has a seperate bridge driver in its driver. 8-(. So, I think he needs to tell you/the rest of us? 1) You imply a PCI-ISA bridge twice. Does the card have a PCI-ISA bridge? 2) Assuming the answer to #1 is "yes", who finds the bridge chip? Is it your code in your driver, or does the OS find it, as a recognized bridge chipset? 3) How do you want to handle the 24-bit address space problem on a PCI device? This is going to depend on the answer to #2. -- Terry