In message <[EMAIL PROTECTED]> 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

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;
                        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.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to