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 Re-enabling interrupt is required only whe...
details: https://anonhg.NetBSD.org/src/rev/ff423db2c49a
branches: trunk
changeset: 942729:ff423db2c49a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Aug 17 07:59:06 2020 +0000
description:
Re-enabling interrupt is required only when a work is scheduled form the
interrput context.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 19 ++++++++++++-------
sys/dev/pci/ixgbe/ixgbe.h | 3 ++-
2 files changed, 14 insertions(+), 8 deletions(-)
diffs (66 lines):
diff -r 3efc1587db2a -r ff423db2c49a sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 17 07:50:41 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 17 07:59:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.237 2020/08/17 07:26:55 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.238 2020/08/17 07:59:06 msaitoh Exp $ */
/******************************************************************************
@@ -3173,9 +3173,10 @@
}
if (task_requests != 0) {
+ /* Re-enabling other interrupts is done in the admin task */
+ task_requests |= IXGBE_REQUEST_TASK_NEED_ACKINTR;
atomic_or_32(&adapter->task_requests, task_requests);
ixgbe_schedule_admin_tasklet(adapter);
- /* Re-enabling other interrupts is done in the admin task */
} else {
/* Re-enable other interrupts */
IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
@@ -4802,11 +4803,13 @@
#endif
}
atomic_store_relaxed(&adapter->admin_pending, 0);
- if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) {
- /* Re-enable other interrupts */
- IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
- } else
- ixgbe_enable_intr(adapter);
+ if ((req & IXGBE_REQUEST_TASK_NEED_ACKINTR) != 0) {
+ if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) {
+ /* Re-enable other interrupts */
+ IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
+ } else
+ ixgbe_enable_intr(adapter);
+ }
IXGBE_CORE_UNLOCK(adapter);
IFNET_UNLOCK(ifp);
@@ -5210,6 +5213,8 @@
reenable_intr = false;
}
if (task_requests != 0) {
+ /* Re-enabling other interrupts is done in the admin task */
+ task_requests |= IXGBE_REQUEST_TASK_NEED_ACKINTR;
atomic_or_32(&adapter->task_requests, task_requests);
ixgbe_schedule_admin_tasklet(adapter);
reenable_intr = false;
diff -r 3efc1587db2a -r ff423db2c49a sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Mon Aug 17 07:50:41 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Mon Aug 17 07:59:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.68 2020/08/17 07:26:55 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.69 2020/08/17 07:59:06 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -768,6 +768,7 @@
#define IXGBE_REQUEST_TASK_FDIR 0x08
#define IXGBE_REQUEST_TASK_PHY 0x10
#define IXGBE_REQUEST_TASK_LSC 0x20
+#define IXGBE_REQUEST_TASK_NEED_ACKINTR 0x80
/* For NetBSD */
const struct sysctlnode *ixgbe_sysctl_instance(struct adapter *);
Home |
Main Index |
Thread Index |
Old Index