diff options
author | marius <marius@FreeBSD.org> | 2010-01-10 18:39:29 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-01-10 18:39:29 +0000 |
commit | e5dcaf82a419955c9606ee0f99b487494479cda5 (patch) | |
tree | ca94d8702a9c5a2a74e6bb852c3900e29b27887e /sys/sparc64 | |
parent | 80a1a3fce559f149101e29478ba428064598359b (diff) | |
download | FreeBSD-src-e5dcaf82a419955c9606ee0f99b487494479cda5.zip FreeBSD-src-e5dcaf82a419955c9606ee0f99b487494479cda5.tar.gz |
When setting up MSIs with a filter ensure that the event queue interrupt
is cleared as it might have triggered before and given we supply NULL
as ic_clear, inthand_add() won't do this for us in this case.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/pci/fire.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/sparc64/pci/fire.c b/sys/sparc64/pci/fire.c index 89b6fab..f8a18c1 100644 --- a/sys/sparc64/pci/fire.c +++ b/sys/sparc64/pci/fire.c @@ -1882,6 +1882,7 @@ fire_setup_intr(device_t dev, device_t child, struct resource *ires, void **cookiep) { struct fire_softc *sc; + struct fire_msiqarg *fmqa; u_long vec; int error; u_int msi, msiq; @@ -1914,17 +1915,24 @@ fire_setup_intr(device_t dev, device_t child, struct resource *ires, rman_set_end(ires, msi); if (error != 0) return (error); + fmqa = intr_vectors[vec].iv_icarg; /* * XXX inject our event queue handler. */ if (filt != NULL) { intr_vectors[vec].iv_func = fire_msiq_filter; intr_vectors[vec].iv_ic = &fire_msiqc_filter; + /* + * Ensure the event queue interrupt is cleared, it + * might have triggered before. Given we supply NULL + * as ic_clear, inthand_add() won't do this for us. + */ + FIRE_PCI_WRITE_8(sc, fmqa->fmqa_fica.fica_clr, + INTCLR_IDLE); } else intr_vectors[vec].iv_func = fire_msiq_handler; /* Record the MSI/MSI-X as long as we we use a 1:1 mapping. */ - ((struct fire_msiqarg *)intr_vectors[vec].iv_icarg)-> - fmqa_msi = msi; + fmqa->fmqa_msi = msi; FIRE_PCI_WRITE_8(sc, FO_PCI_EQ_CTRL_SET_BASE + (msiq << 3), FO_PCI_EQ_CTRL_SET_EN); msi <<= 3; |