Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/f6d9e9d53e45
branches:  netbsd-8
changeset: 851223:f6d9e9d53e45
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Dec 10 10:16:09 2017 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #432):
        sys/dev/pci/if_wm.c: revision 1.548
Fix a bug that 8257[56] can't receive packet reported by Bert Kiers in
PR#52717. 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.

diffstat:

 sys/dev/pci/if_wm.c |  25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diffs (62 lines):

diff -r ffa1e95f2bbd -r f6d9e9d53e45 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Sun Dec 10 10:10:23 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Sun Dec 10 10:16:09 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.508.4.9 2017/12/10 10:10:24 snj Exp $      */
+/*     $NetBSD: if_wm.c,v 1.508.4.10 2017/12/10 10:16:09 snj Exp $     */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.9 2017/12/10 10:10:24 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.10 2017/12/10 10:16:09 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -5814,6 +5814,14 @@
                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 @@
                }
        }
 
-       /* Set the receive filter. */
-       wm_set_filter(sc);
-
        wm_unset_stopping_flags(sc);
 
        /* Start the one second link check clock. */
@@ -6688,13 +6693,13 @@
                                return ENOMEM;
                        }
                } else {
+                       /*
+                        * 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);
-                       /*
-                        * For 82575 and newer device, the RX descriptors
-                        * must be initialized after the setting of RCTL.EN in
-                        * wm_set_filter()
-                        */
                }
        }
        rxq->rxq_ptr = 0;



Home | Main Index | Thread Index | Old Index