armani also pointed out the same issue with
my MCLGETI diff for xl(4).

I've adapted bluhm's patch and it works fine
here.

Any feedback ?

Index: src/sys/dev/ic/xl.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/xl.c,v
retrieving revision 1.99
diff -u -p -r1.99 xl.c
--- src/sys/dev/ic/xl.c 22 Sep 2010 08:49:14 -0000      1.99
+++ src/sys/dev/ic/xl.c 23 Mar 2011 19:12:09 -0000
@@ -1560,6 +1560,14 @@ xl_stats_update(void *xsc)
        XL_SEL_WIN(4);
        CSR_READ_1(sc, XL_W4_BADSSD);
 
+       /*
+        * If buffer allocation fails, the receiver ring may become
+        * empty. There is no receive interrupt to recover from that.
+        */
+       
+       if (sc->xl_cdata.xl_rx_cnt == 0)
+               xl_fill_rx_ring(sc);
+
        if (mii != NULL && (!sc->xl_stats_no_timeout))
                mii_tick(mii);

Reply via email to