From owner-freebsd-stable@FreeBSD.ORG Tue Nov 23 00:39:12 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 10D4E16A4CE for ; Tue, 23 Nov 2004 00:39:12 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 976C743D1F for ; Tue, 23 Nov 2004 00:39:11 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id iAN0a0iV027677; Mon, 22 Nov 2004 17:36:01 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 22 Nov 2004 17:36:36 -0700 (MST) Message-Id: <20041122.173636.102807556.imp@bsdimp.com> To: gurney_j@resnet.uoregon.edu From: "M. Warner Losh" In-Reply-To: <20041122180515.GX57546@funkthat.com> References: <20041120084456.GU57546@funkthat.com> <20041122113525.G31812@bsd3.nyct.net> <20041122180515.GX57546@funkthat.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-stable@FreeBSD.org Subject: Re: SIIG cards and puc X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 00:39:12 -0000 In message: <20041122180515.GX57546@funkthat.com> John-Mark Gurney writes: : Paul Sandys wrote this message on Mon, Nov 22, 2004 at 11:46 -0500: : > The SIIG card I have does use shared interrupt for both ports, so I don't see : > any other way around it. : > : > The 0x40000001 is a regular flag that's used by sio.c . I found an undocumented : > feature in there, that allows you to set a FIFO size, so I used it in : > combination with the shared irq flag. : : Ahh, yes... Then we now have the interesting problem that it appears : that PUC and sio share flags... :( : : from puc.c: : type = (sc->sc_desc.ports[i].flags & PUC_FLAGS_MEMORY) : ? SYS_RES_MEMORY : SYS_RES_IOPORT; : : and: : device_set_flags(sc->sc_ports[i].dev, : sc->sc_desc.ports[i].flags); : : which means you are also turning on memory mapping for the card... : : I'm not comfortable including a flag for an undocumented feature as a : standard part of the system.. Care to document it? :) : : Also, are you sure it's the ISMULTIPORT that needs to be set? (and not : the MEMORY flag you are acidentally also setting?) From what I've read : of the PUC driver, it handles the multiport case for you since it hands : out the interrupts to the sio driver... see this comment above puc_intr: : * This is an interrupt handler. For boards that can't tell us which : * device generated the interrupt it just calls all the registered : * handlers sequencially, but for boards that can tell us which : : hmmm.. that's probably how it gets around the fact that it doesn't need : to pass in the multiport flag, so we should probably be clearing that : flag before passing it down to the lower layers... You don't need the MULTIPORT to use PUC. If you do, then something in the tables is setup right. MULTIPORT is only for ISA cards. So that's clearly wrong. Can someone send me the patch for review. I've added devices to puc in the past. Warner