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 - Remove extra kpreempt_disable() -> kpre...
details: https://anonhg.NetBSD.org/src/rev/dabc676d4a95
branches: trunk
changeset: 972868:dabc676d4a95
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Jun 12 09:28:48 2020 +0000
description:
- Remove extra kpreempt_disable() -> kpreempt_enable() because
ixgbe_handle_msf() was changed from softint to workqueue.
- Set schedule_wqs_ok before enabling interrupt to prevent the race.
- Fix comment.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (48 lines):
diff -r 6a9855be1d0e -r dabc676d4a95 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 12 06:44:57 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Fri Jun 12 09:28:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.229 2020/06/11 09:16:05 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.230 2020/06/12 09:28:48 msaitoh Exp $ */
/******************************************************************************
@@ -1538,9 +1538,7 @@
ixgbe_schedule_msf_tasklet(adapter);
kpreempt_enable();
}
- kpreempt_disable();
softint_schedule(adapter->mod_si);
- kpreempt_enable();
} else {
struct ifmedia *ifm = &adapter->media;
@@ -4126,6 +4124,9 @@
/* Setup DMA Coalescing */
ixgbe_config_dmac(adapter);
+ /* OK to schedule workqueues. */
+ adapter->schedule_wqs_ok = true;
+
/* And now turn on interrupts */
ixgbe_enable_intr(adapter);
@@ -4143,9 +4144,6 @@
/* Now inform the stack we're ready */
ifp->if_flags |= IFF_RUNNING;
- /* OK to schedule workqueues. */
- adapter->schedule_wqs_ok = true;
-
return;
} /* ixgbe_init_locked */
@@ -4694,7 +4692,7 @@
/*
* Hold the IFNET_LOCK across this entire call. This will
- * prevent additional changes to adapter->phy_layer and
+ * prevent additional changes to adapter->phy_layer
* and serialize calls to this tasklet. We cannot hold the
* CORE_LOCK while calling into the ifmedia functions as
* they may block while allocating memory.
Home |
Main Index |
Thread Index |
Old Index