Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/ixgbe Add missing {ixgbe, ixv}_stop() in the deta...



details:   https://anonhg.NetBSD.org/src/rev/729deda879de
branches:  trunk
changeset: 824171:729deda879de
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri May 26 09:17:32 2017 +0000

description:
Add missing {ixgbe,ixv}_stop() in the detach function. Without this change,
shutdown won't finish or panic on heay traffic.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  4 +++-
 sys/dev/pci/ixgbe/ixv.c   |  6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r e33d61e967d1 -r 729deda879de sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri May 26 09:02:33 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri May 26 09:17:32 2017 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.86 2017/05/26 08:36:41 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.87 2017/05/26 09:17:32 msaitoh Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -774,6 +774,8 @@
        if (adapter->osdep.attached == false)
                return 0;
 
+       /* Stop the interface. Callouts are stopped in it. */
+       ixgbe_ifstop(adapter->ifp, 1);
 #if NVLAN > 0
        /* Make sure VLANs are not using driver */
        if (!VLAN_ATTACHED(&adapter->osdep.ec))
diff -r e33d61e967d1 -r 729deda879de sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Fri May 26 09:02:33 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Fri May 26 09:17:32 2017 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.55 2017/03/03 04:37:05 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.56 2017/05/26 09:17:32 msaitoh Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -87,6 +87,7 @@
 static int      ixv_ioctl(struct ifnet *, u_long, void *);
 static int     ixv_init(struct ifnet *);
 static void    ixv_init_locked(struct adapter *);
+static void    ixv_ifstop(struct ifnet *, int);
 static void     ixv_stop(void *);
 static void     ixv_media_status(struct ifnet *, struct ifmediareq *);
 static int      ixv_media_change(struct ifnet *);
@@ -498,6 +499,9 @@
        if (adapter->osdep.attached == false)
                return 0;
 
+       /* Stop the interface. Callouts are stopped in it. */
+       ixv_ifstop(adapter->ifp, 1);
+
 #if NVLAN > 0
        /* Make sure VLANS are not using driver */
        if (!VLAN_ATTACHED(&adapter->osdep.ec))



Home | Main Index | Thread Index | Old Index