Bring back the PUC_FASTINTR option, and implement it correctly so that
child devices also know if they are fast or normal. Requested by: bde
This commit is contained in:
parent
e7fa55af89
commit
d3c10e33e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=102929
@ -159,8 +159,18 @@ puc_attach(device_t dev, const struct puc_device_description *desc)
|
||||
|
||||
sc->irqres = res;
|
||||
sc->irqrid = rid;
|
||||
#ifdef PUC_FASTINTR
|
||||
irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
|
||||
INTR_TYPE_TTY | INTR_FAST, puc_intr, sc, &sc->intr_cookie);
|
||||
if (irq_setup == 0)
|
||||
sc->fastintr = 1;
|
||||
else
|
||||
irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
|
||||
INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie);
|
||||
#else
|
||||
irq_setup = BUS_SETUP_INTR(device_get_parent(dev), dev, res,
|
||||
INTR_TYPE_TTY, puc_intr, sc, &sc->intr_cookie);
|
||||
#endif
|
||||
if (irq_setup != 0)
|
||||
return (ENXIO);
|
||||
|
||||
@ -450,9 +460,9 @@ puc_setup_intr(device_t dev, device_t child, struct resource *r, int flags,
|
||||
int i;
|
||||
struct puc_softc *sc;
|
||||
|
||||
if (flags & INTR_FAST)
|
||||
return (ENXIO);
|
||||
sc = (struct puc_softc *)device_get_softc(dev);
|
||||
if ((flags & INTR_FAST) && !sc->fastintr)
|
||||
return (ENXIO);
|
||||
for (i = 0; PUC_PORT_VALID(sc->sc_desc, i); i++) {
|
||||
if (sc->sc_ports[i].dev == child) {
|
||||
if (sc->sc_ports[i].ihand != 0)
|
||||
|
@ -118,6 +118,7 @@ struct puc_softc {
|
||||
const struct puc_device_description *sc_desc;
|
||||
|
||||
/* card-global dynamic data */
|
||||
int fastintr;
|
||||
int barmuxed;
|
||||
int irqrid;
|
||||
struct resource *irqres;
|
||||
|
Loading…
Reference in New Issue
Block a user