Hi, all

On 2017/11/22 0:21, Bert Kiers wrote:
Hi,

A different computer with the same type motherboard has the same
problem.  A quad I350 (also wm(4)) works fine (with GENERIC netbsd-8
kernel).

Still wondering what queue drops are.

Grtnx,

 Could you test the following diff?

-----------------------
 Fix a bug that 8257[56] can't receive packet. For 82575 and 82576, the RX
descriptors must be initialized after the setting of RCTL.EN in
wm_set_filter(). This bug was added in if_wm.c rev. 1.515.

Index: if_wm.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.546
diff -u -p -r1.546 if_wm.c
--- if_wm.c     30 Nov 2017 09:24:18 -0000      1.546
+++ if_wm.c     1 Dec 2017 07:36:26 -0000
@@ -5814,6 +5814,14 @@ wm_init_locked(struct ifnet *ifp)
                break;
        }
+ /*
+        * Set the receive filter.
+        *
+        * For 82575 and 82576, the RX descriptors must be initialized after
+        * the setting of RCTL.EN in wm_set_filter()
+        */
+       wm_set_filter(sc);
+
        /* On 575 and later set RDT only if RX enabled */
        if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) {
                int qidx;
@@ -5828,9 +5836,6 @@ wm_init_locked(struct ifnet *ifp)
                }
        }
- /* Set the receive filter. */
-       wm_set_filter(sc);
-
        wm_unset_stopping_flags(sc);
/* Start the one second link check clock. */
@@ -6688,13 +6693,13 @@ wm_init_rx_buffer(struct wm_softc *sc, s
                                return ENOMEM;
                        }
                } else {
-                       if ((sc->sc_flags & WM_F_NEWQUEUE) == 0)
-                               wm_init_rxdesc(rxq, i);
                        /*
-                        * For 82575 and newer device, the RX descriptors
-                        * must be initialized after the setting of RCTL.EN in
+                        * For 82575 and 82576, the RX descriptors must be
+                        * initialized after the setting of RCTL.EN in
                         * wm_set_filter()
                         */
+                       if ((sc->sc_flags & WM_F_NEWQUEUE) == 0)
+                               wm_init_rxdesc(rxq, i);
                }
        }
        rxq->rxq_ptr = 0;
-----------------------


The same diff is at:

        http://www.netbsd.org/~msaitoh/wm-825756-20171201-0.dif

--
-----------------------------------------------
                SAITOH Masanobu ([email protected]
                                 [email protected])

Reply via email to