call for bge(4) testers

[ Available lists | Index of freebsd-current | Month of Aug 2006 | Week of 22 Aug 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Pyun YongHyeon <pyunyh@gmail.com>
Date
22 Aug 2006 04:20:48
Subject
call for bge(4) testers
Message-ID
20060822042023.GC12848@cdnetworks.co.kr


[ Hide this part ]
Hi,

After fixing em(4) watchdog bug, I looked over bge(4) and I think
bge(4) may suffer from the same issue. So if you have seen occasional
watchdog timeout errors on bge(4) please give the attached patch a try.
The patch does fix false watchdog timeout error only.
Typical pheonoma for false watchdog timeout error are
o polling(4) fix the issue
o random watchdog error

If my patch fix the issue you could see the following messages.
"missing Tx completion interrupt!" or "link lost -- resetting"

Thanks.
--
Regards,
Pyun YongHyeon


[ Hide this part ]
Index: if_bge.c
===================================================================
RCS file: /pool/ncvs/src/sys/dev/bge/if_bge.c,v
retrieving revision 1.138
diff -u -r1.138 if_bge.c
--- if_bge.c 18 Aug 2006 13:53:53 -0000 1.138
+++ if_bge.c 22 Aug 2006 04:18:12 -0000
@@ -3452,12 +3452,29 @@

sc = ifp->if_softc;

- if_printf(ifp, "watchdog timeout -- resetting\n");
+ BGE_LOCK(sc);
+ /*
+ * Reclaim first as there is a possibility of losing Tx completion
+ * interrupts. Possible cause of missing Tx completion interrupts
+ * comes from Tx interrupt moderation mechanism(delayed interrupts)
+ * or chipset bug.
+ */
+ bge_txeof(sc);
+ if (sc->bge_txcnt == 0) {
+ if_printf(ifp, "missing Tx completion interrupt!\n");
+ BGE_UNLOCK(sc);
+ return;
+ }
+ if (sc->bge_link)
+ if_printf(ifp, "watchdog timeout -- resetting\n");
+ else
+ if_printf(ifp, "link lost -- resetting\n");

ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- bge_init(sc);
+ bge_init_locked(sc);

ifp->if_oerrors++;
+ BGE_UNLOCK(sc);
}

/*



Elapsed time: 0.156 seconds