Module Name: src
Committed By: msaitoh
Date: Fri May 26 09:17:33 UTC 2017
Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c
Log Message:
Add missing {ixgbe,ixv}_stop() in the detach function. Without this change,
shutdown won't finish or panic on heay traffic.
To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/ixgbe/ixv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.86 src/sys/dev/pci/ixgbe/ixgbe.c:1.87
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.86 Fri May 26 08:36:41 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c Fri May 26 09:17:32 2017
@@ -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 @@ ixgbe_detach(device_t dev, int flags)
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))
Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.55 src/sys/dev/pci/ixgbe/ixv.c:1.56
--- src/sys/dev/pci/ixgbe/ixv.c:1.55 Fri Mar 3 04:37:05 2017
+++ src/sys/dev/pci/ixgbe/ixv.c Fri May 26 09:17:32 2017
@@ -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_shutdown(device_t);
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 @@ ixv_detach(device_t dev, int flags)
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))