Here's an attempt to fix a potential MCLGETI issue with vr(4) similar
to what I recently fixed fro re(4). Unfortunately I don't have any
vr(4) hardware myself, so I need some hep testing this.
Things to look for are:
1. Does this diff have any effect on throughput (packets/s, bits/s).
2. Does this fix any problems with the interface if you blast it with
packets?
3. Does livelock mitigation actualy work?
Thanks,
Mark
Index: if_vr.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.106
diff -u -p -r1.106 if_vr.c
--- if_vr.c 3 Sep 2010 18:14:54 -0000 1.106
+++ if_vr.c 5 Dec 2010 15:36:37 -0000
@@ -1048,15 +1048,11 @@ vr_intr(void *arg)
/* Disable interrupts. */
CSR_WRITE_2(sc, VR_IMR, 0x0000);
- for (;;) {
-
- status = CSR_READ_2(sc, VR_ISR);
- if (status)
- CSR_WRITE_2(sc, VR_ISR, status);
-
- if ((status & VR_INTRS) == 0)
- break;
+ status = CSR_READ_2(sc, VR_ISR);
+ if (status)
+ CSR_WRITE_2(sc, VR_ISR, status);
+ if (status & VR_INTRS) {
claimed = 1;
if (status & VR_ISR_RX_OK)
@@ -1092,7 +1088,7 @@ vr_intr(void *arg)
sc->sc_dev.dv_xname);
vr_reset(sc);
vr_init(sc);
- break;
+ status = 0;
}
if ((status & VR_ISR_TX_OK) || (status & VR_ISR_TX_ABRT) ||