On Tue, Oct 01, 2013 at 09:32:30PM +0200, Mark Kettenis wrote: > Some re(4) variants now use msi. Unfortunately the interrupt handler > isn't careful enough, and we might miss an interrupt. The diff below > seems to fix that by disabling the interrupts while processing an > interrupt. This is what FreeBSD & Linux seem to do. > > Needs testing on a wide variety of re(4), especially on thoe that > don't use msi yet. > > > Index: re.c > =================================================================== > RCS file: /cvs/src/sys/dev/ic/re.c,v > retrieving revision 1.143 > diff -u -p -r1.143 re.c > --- re.c 7 Aug 2013 01:06:30 -0000 1.143 > +++ re.c 21 Aug 2013 19:50:39 -0000 > @@ -1650,6 +1650,9 @@ re_intr(void *arg) > if (!(ifp->if_flags & IFF_RUNNING)) > return (0); > > + /* Disable interrupts. */ > + CSR_WRITE_2(sc, RL_IMR, 0); > + > rx = tx = 0; > status = CSR_READ_2(sc, RL_ISR); > /* If the card has gone away the read returns 0xffff. */ > @@ -1715,6 +1718,8 @@ re_intr(void *arg) > > if (tx && !IFQ_IS_EMPTY(&ifp->if_snd)) > re_start(ifp); > + > + CSR_WRITE_2(sc, RL_IMR, sc->rl_intrs); > > return (claimed); > } >
So far so good on my amd64 build box with a re0 at pci5 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E-VL (0x2c80) , apic 7 int 16, address 94:de:80:0b:91:ec rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5 .... Ken