From owner-freebsd-current Sat Jul 7 15:22:45 2001 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id AE4F637B405; Sat, 7 Jul 2001 15:22:40 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f67MMdg10654; Sat, 7 Jul 2001 16:22:39 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f67MMcJ73265; Sat, 7 Jul 2001 16:22:38 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200107072222.f67MMcJ73265@harmony.village.org> To: Peter Wemm Subject: Re: Problems with ata probing twice. Cc: Mike Smith , Makoto MATSUSHITA , sos@freebsd.dk, current@FreeBSD.ORG In-reply-to: Your message of "Sat, 07 Jul 2001 14:53:44 PDT." <20010707215344.4B1F2380F@overcee.netplex.com.au> References: <20010707215344.4B1F2380F@overcee.netplex.com.au> Date: Sat, 07 Jul 2001 16:22:38 -0600 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20010707215344.4B1F2380F@overcee.netplex.com.au> Peter Wemm writes: : The upshot of this is that drivers should be setting RF_SHAREABLE if they : themselves can handle the possibility that the motherboard is wired up for : sharing their IRQ. It is up to the bus controller to sort out what is : really electrically shareable and what is not... the drivers themselves do : not have this information (and should not be looking for it). I expect : the bus drivers need more work in this area. OK. Right now in current pcic_pci has code that looks like the following: struct resource * pcic_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { struct pcic_softc *sc = device_get_softc(dev); /* * If we're routing via pci, we can share. */ if (sc->func_route == pci_parallel && type == SYS_RES_IRQ) { if (bootverbose) device_printf(child, "Forcing IRQ to %d\n", sc->irq); start = end = sc->irq; flags |= RF_SHAREABLE; } return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } Which attempts to force the irq to be correct for the bridge. The only potentially bogus thing in that is turning on the RF_SHAREABLE flag. Are you saying that all pccard drivers that don't have a specific reason NOT to turn it on should turn it on and the above code should look more like: if (type == SYS_RES_IRQ) { if (sc->func_route == pci_parallel) start = end = sc->irq; else flags &= ~RF_SHAREABLE; } This would also mean that the isa bus would need code that look like: if (type == SYS_RES_IRQ) flags &= ~RF_SHAREABLE; in it as well. However, that's a problem because *some* ISA hardware can share interrupts. Timing Solutions makes hardware that does this :-) Somehow, this doesn't seem quite right. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message