Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/pci/ixgbe/ixgbe.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/pci/ixgbe/ixgbe.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.292 retrieving revision 1.293 diff -u -p -r1.292 -r1.293 --- src/sys/dev/pci/ixgbe/ixgbe.c 2021/09/16 09:55:28 1.292 +++ src/sys/dev/pci/ixgbe/ixgbe.c 2021/09/30 04:06:50 1.293 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.292 2021/09/16 09:55:28 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.293 2021/09/30 04:06:50 yamaguchi Exp $ */ /****************************************************************************** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.292 2021/09/16 09:55:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.293 2021/09/30 04:06:50 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -75,7 +75,6 @@ __KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1. #include "ixgbe.h" #include "ixgbe_phy.h" #include "ixgbe_sriov.h" -#include "vlan.h" #include #include @@ -3668,17 +3667,13 @@ ixgbe_detach(device_t dev, int flags) return (EBUSY); } -#if NVLAN > 0 - /* Make sure VLANs are not using driver */ - if (!VLAN_ATTACHED(&adapter->osdep.ec)) - ; /* nothing to do: no VLANs */ - else if ((flags & (DETACH_SHUTDOWN | DETACH_FORCE)) != 0) - vlan_ifdetach(adapter->ifp); - else { + if (VLAN_ATTACHED(&adapter->osdep.ec) && + (flags & (DETACH_SHUTDOWN | DETACH_FORCE)) == 0) { aprint_error_dev(dev, "VLANs in use, detach first\n"); return (EBUSY); } -#endif + + ether_ifdetach(adapter->ifp); adapter->osdep.detaching = true; /* @@ -3699,8 +3694,6 @@ ixgbe_detach(device_t dev, int flags) pmf_device_deregister(dev); - ether_ifdetach(adapter->ifp); - ixgbe_free_deferred_handlers(adapter); /* let hardware know driver is unloading */