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 Fix a bug that the legacy interrupt doesn'...
details: https://anonhg.NetBSD.org/src/rev/b79d92d0d1fc
branches: trunk
changeset: 366539:b79d92d0d1fc
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon May 30 05:07:38 2022 +0000
description:
Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed.
Fixes PR kern/56857.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (70 lines):
diff -r bf1e460107cb -r b79d92d0d1fc sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon May 30 03:33:07 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon May 30 05:07:38 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.314 2022/04/25 07:56:47 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.315 2022/05/30 05:07:38 msaitoh Exp $ */
/******************************************************************************
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.314 2022/04/25 07:56:47 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.315 2022/05/30 05:07:38 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1131,7 +1131,6 @@
ixgbe_free_queues(adapter);
/* Fallback to legacy interrupt */
- adapter->feat_en &= ~IXGBE_FEATURE_MSIX;
if (adapter->feat_cap & IXGBE_FEATURE_MSI)
adapter->feat_en |= IXGBE_FEATURE_MSI;
adapter->num_queues = 1;
@@ -5212,7 +5211,7 @@
IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask);
/* With MSI-X we use auto clear */
- if (adapter->msix_mem) {
+ if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) {
/*
* We use auto clear for RTX_QUEUE only. Don't use other
* interrupts (e.g. link interrupt). BTW, we don't use
@@ -5244,7 +5243,7 @@
/* disable interrupts other than queues */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~IXGBE_EIMC_RTX_QUEUE);
- if (adapter->msix_mem)
+ if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0)
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, 0);
for (int i = 0; i < adapter->num_queues; i++, que++)
@@ -6881,6 +6880,7 @@
adapter->osdep.nintrs) != 0) {
aprint_error_dev(dev,
"failed to allocate MSI-X interrupt\n");
+ adapter->feat_en &= ~IXGBE_FEATURE_MSIX;
return (ENXIO);
}
@@ -7067,7 +7067,7 @@
if (msgs < 2)
goto msi;
- adapter->msix_mem = (void *)1; /* XXX */
+ adapter->feat_en |= IXGBE_FEATURE_MSIX;
/* Figure out a reasonable auto config value */
queues = (ncpu > (msgs - 1)) ? (msgs - 1) : ncpu;
@@ -7121,7 +7121,7 @@
adapter->feat_en &= ~IXGBE_FEATURE_SRIOV;
msgs = pci_msi_count(adapter->osdep.pc, adapter->osdep.tag);
- adapter->msix_mem = NULL; /* XXX */
+ adapter->feat_en &= ~IXGBE_FEATURE_MSIX;
if (msgs > 1)
msgs = 1;
if (msgs != 0) {
Home |
Main Index |
Thread Index |
Old Index