[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pcbb: edge and pulse interrupts
- To: bugs_(_at_)_openbsd_(_dot_)_org
- Subject: pcbb: edge and pulse interrupts
- From: Alexey Dobriyan <adobriyan_(_at_)_gmail_(_dot_)_com>
- Date: Wed, 15 Mar 2006 14:19:38 +0300
sys/dev/pci/pccbb.c:
2868 void *
2869 pccbb_pcmcia_intr_establish(pch, pf, ipl, func, arg, xname)
2876 {
2877 struct pcic_handle *ph = (struct pcic_handle *)pch;
2878 struct pccbb_softc *sc = (struct pccbb_softc *)ph->ph_parent;
2879
2880 ===> if (!(pf->cfe->flags & PCMCIA_CFE_IRQLEVEL)) { <===
2881 /* what should I do? */
2882 ===> if (pf->cfe->flags & PCMCIA_CFE_IRQLEVEL) { <===
2883 DPRINTF(
2884 ("%s does not provide edge nor pulse interrupt\n",
2885 sc->sc_dev.dv_xname));
2886 return NULL;
2887 }
2888 /*
2889 * XXX Noooooo! The interrupt flag must set properly!!
2890 * dumb pcmcia driver!!
2891 */
2892 }
2893
2894 return pccbb_intr_establish(sc, IST_LEVEL, ipl, func, arg);
2895 }
Judging by debug text and PCMCIA_CFE_* defines, second check should be
if (!(pf->cfe->flags & PCMCIA_CFE_IRQPULSE))
Judging by expected logic here, checks should be consolidated via
if (!(flags & LEVEL) && !(flags && PULSE)) {
DPRINTF
return NULL;
}
Can someone confirm or deny?
Visit your host, monkey.org