Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/pci/ixgbe Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/b3036d0ff0cb
branches: netbsd-9
changeset: 366583:b3036d0ff0cb
user: martin <martin%NetBSD.org@localhost>
date: Tue May 31 14:03:26 2022 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1458):
sys/dev/pci/ixgbe/ixv.c: revision 1.181
sys/dev/pci/ixgbe/ixgbe.c: revision 1.315
sys/dev/pci/ixgbe/ixgbe.h: revision 1.86
Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed.
Fixes PR kern/56857.
Remove unused adapter->msix_mem.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 14 +++++++-------
sys/dev/pci/ixgbe/ixgbe.h | 3 +--
sys/dev/pci/ixgbe/ixv.c | 5 ++---
3 files changed, 10 insertions(+), 12 deletions(-)
diffs (113 lines):
diff -r f89f4ec9eb1e -r b3036d0ff0cb sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon May 30 17:03:54 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue May 31 14:03:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.21 2022/05/30 17:01:06 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.22 2022/05/31 14:03:26 martin Exp $ */
/******************************************************************************
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.21 2022/05/30 17:01:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.22 2022/05/31 14:03:26 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1096,7 +1096,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;
@@ -5054,7 +5053,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
@@ -5086,7 +5085,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++)
@@ -6743,6 +6742,7 @@
adapter->osdep.nintrs) != 0) {
aprint_error_dev(dev,
"failed to allocate MSI-X interrupt\n");
+ adapter->feat_en &= ~IXGBE_FEATURE_MSIX;
return (ENXIO);
}
@@ -6942,7 +6942,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;
@@ -6996,7 +6996,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) {
diff -r f89f4ec9eb1e -r b3036d0ff0cb sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Mon May 30 17:03:54 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Tue May 31 14:03:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.56.2.7 2022/01/30 15:58:28 martin Exp $ */
+/* $NetBSD: ixgbe.h,v 1.56.2.8 2022/05/31 14:03:27 martin Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -479,7 +479,6 @@
struct if_percpuq *ipq; /* softint-based input queues */
struct resource *pci_mem;
- struct resource *msix_mem;
/* NetBSD: Interrupt resources are in osdep */
diff -r f89f4ec9eb1e -r b3036d0ff0cb sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c Mon May 30 17:03:54 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c Tue May 31 14:03:26 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.125.2.18 2022/05/30 17:01:06 martin Exp $ */
+/* $NetBSD: ixv.c,v 1.125.2.19 2022/05/31 14:03:26 martin Exp $ */
/******************************************************************************
@@ -35,7 +35,7 @@
/*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.125.2.18 2022/05/30 17:01:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.125.2.19 2022/05/31 14:03:26 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -3487,7 +3487,6 @@
return -1;
}
- adapter->msix_mem = (void *)1; /* XXX */
aprint_normal_dev(dev,
"Using MSI-X interrupts with %d vectors\n", msgs);
adapter->num_queues = queues;
Home |
Main Index |
Thread Index |
Old Index