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 The admin workqueue can be used even if th...



details:   https://anonhg.NetBSD.org/src/rev/9f87d9362d2a
branches:  trunk
changeset: 937729:9f87d9362d2a
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Aug 24 18:42:17 2020 +0000

description:
The admin workqueue can be used even if the interface is not up.
OK'd by thorpej@. Will fixes PR#55534 reported by Shinichi Doyashiki

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (34 lines):

diff -r 7e7daf952e26 -r 9f87d9362d2a sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 24 18:41:22 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 24 18:42:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.242 2020/08/24 18:31:14 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.243 2020/08/24 18:42:17 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -1507,11 +1507,10 @@
 static void
 ixgbe_schedule_admin_tasklet(struct adapter *adapter)
 {
-       if (adapter->schedule_wqs_ok) {
-               if (atomic_cas_uint(&adapter->admin_pending, 0, 1) == 0)
-                       workqueue_enqueue(adapter->admin_wq,
-                           &adapter->admin_wc, NULL);
-       }
+
+       if (atomic_cas_uint(&adapter->admin_pending, 0, 1) == 0)
+               workqueue_enqueue(adapter->admin_wq,
+                   &adapter->admin_wc, NULL);
 }
 
 /************************************************************************
@@ -4841,8 +4840,6 @@
        ixgbe_stop(adapter);
        IXGBE_CORE_UNLOCK(adapter);
 
-       workqueue_wait(adapter->admin_wq, &adapter->admin_wc);
-       atomic_store_relaxed(&adapter->admin_pending, 0);
        workqueue_wait(adapter->timer_wq, &adapter->timer_wc);
        atomic_store_relaxed(&adapter->timer_pending, 0);
 }



Home | Main Index | Thread Index | Old Index