Date: Sat, 07 Jul 2001 16:22:38 -0600 From: Warner Losh <imp@harmony.village.org> To: Peter Wemm <peter@wemm.org> Cc: Mike Smith <msmith@FreeBSD.ORG>, Makoto MATSUSHITA <matusita@jp.FreeBSD.org>, sos@freebsd.dk, current@FreeBSD.ORG Subject: Re: Problems with ata probing twice. Message-ID: <200107072222.f67MMcJ73265@harmony.village.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107072222.f67MMcJ73265>
