Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 May 1999 19:36:44 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        hackers@freebsd.org
Subject:   Advice on terrible hacky PCI driver.
Message-ID:  <Pine.BSF.3.95.990507185722.14285U-100000@current1.whistle.com>

next in thread | raw e-mail | index | archive | help


I have a driver for a device that exists onthe PCI bus..
unfortunatly (don't ask) it has a separate interrupt as well that runs
directly to int6 of the 8259. (not via the PCI bus and not configured in
by the bios etc.)

I've tried the following terrible hack in the driver, but it didn't seem
to work.  any thoughts? 



static void
pwrfailPCIattach( pcici_t config_id, int unit)
{       
        sc_p    scp;
        scp = sca[unit];
        
        config_id->intline = 6; /* pretend the chip said irq 6 */
        config_id->intpin = 4;  /* pretend it's pin D */
        /*
         * Allocate our (hardwired) interrupt.
         */
        if (!pci_map_int(config_id, pwrfailintr, scp, &bio_imask)) {
                printf("pwrfail%d: couldn't map interrupt\n", unit);
        } else {
                printf("pwrfail%d: interrupt %d mapped\n",
                                        unit, config_id->intline);
        }
}


It get's the success message, but the interrupt is never delivered to the 
routine pwrfailintr().


julian







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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990507185722.14285U-100000>