Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2000 15:38:00 +0800 (+0800)
From:      Michael Robinson <robinson@netrinsics.com>
To:        imp@village.org, robinson@netrinsics.com
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: 3Com 3CCFE574BT works.
Message-ID:  <200001180738.PAA03315@netrinsics.com>
In-Reply-To: <200001180612.XAA14850@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@village.org> writes:
>: The official way to hardwire a pccard to an IRQ in -STABLE is what, then?
>
>/etc/pccard.conf supports this, does it not?

No, it does not.  At the very best, /etc/pccard.conf supports a suggestion
of an IRQ, which the system is perfectly willing to ignore, depending on the
the imask value returned by wave_dead_chicken().

If you require deterministic assignment of an IRQ to a pccard, you have to 
hardcode an imask value in pccard_alloc_intr(), and build a kernel
specifically for that case.

	-Michael

P.S.  To save people the trouble of verifying that this is the case, I 
include the relevant code from sys/pccard/pccard.c:
---------------------------------------------------------------
/*
 *  pccard_alloc_intr - allocate an interrupt from the
 *  free interrupts and return its number. The interrupts
 *  allowed are passed as a mask.
 */
int
pccard_alloc_intr(u_int imask, inthand2_t *hand, int unit,
          u_int *maskp, u_int *pcic_imask)
{
    int irq;
    unsigned int mask;

    for (irq = 1; irq < ICU_LEN; irq++) {
        mask = 1ul << irq;
        if (!(mask & imask))
            continue;
        INTRMASK(*maskp, mask);
        if (register_intr(irq, 0, 0, hand, maskp, unit) == 0) {
            /* add this to the PCIC controller's mask */
            if (pcic_imask)
                INTRMASK(*pcic_imask, (1 << irq));
            update_intr_masks();
            INTREN(mask); 
            return(irq);
        }
        /* No luck, remove from mask again... */
        INTRUNMASK(*maskp, mask);
        update_intr_masks();
    }
    return(-1); 
}


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001180738.PAA03315>