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 Clear que->disabled_count in {ixgbe, ixv}_i...
details: https://anonhg.NetBSD.org/src/rev/ecc8dd82a48a
branches: trunk
changeset: 319444:ecc8dd82a48a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed May 30 08:35:26 2018 +0000
description:
Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without this,
interrupt mask state and EIMS may mismatch and if_init doesn't recover
from TX/RX stall problem.
This change itself doesn't fix PR#53294.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 5 ++++-
sys/dev/pci/ixgbe/ixv.c | 8 +++++---
2 files changed, 9 insertions(+), 4 deletions(-)
diffs (62 lines):
diff -r c1fdd690ff2c -r ecc8dd82a48a sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed May 30 05:09:11 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed May 30 08:35:26 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.156 2018/05/25 04:40:27 ozaki-r Exp $ */
+/* $NetBSD: ixgbe.c,v 1.157 2018/05/30 08:35:26 msaitoh Exp $ */
/******************************************************************************
@@ -3794,6 +3794,7 @@
struct ifnet *ifp = adapter->ifp;
device_t dev = adapter->dev;
struct ixgbe_hw *hw = &adapter->hw;
+ struct ix_queue *que;
struct tx_ring *txr;
struct rx_ring *rxr;
u32 txdctl, mhadd;
@@ -3809,6 +3810,8 @@
hw->adapter_stopped = FALSE;
ixgbe_stop_adapter(hw);
callout_stop(&adapter->timer);
+ for (i = 0, que = adapter->queues; i < adapter->num_queues; i++, que++)
+ que->disabled_count = 0;
/* XXX I moved this here from the SIOCSIFMTU case in ixgbe_ioctl(). */
adapter->max_frame_size =
diff -r c1fdd690ff2c -r ecc8dd82a48a sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c Wed May 30 05:09:11 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c Wed May 30 08:35:26 2018 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.101 2018/05/25 04:40:27 ozaki-r Exp $*/
+/*$NetBSD: ixv.c,v 1.102 2018/05/30 08:35:26 msaitoh Exp $*/
/******************************************************************************
@@ -719,7 +719,7 @@
struct ifnet *ifp = adapter->ifp;
device_t dev = adapter->dev;
struct ixgbe_hw *hw = &adapter->hw;
- struct ix_queue *que = adapter->queues;
+ struct ix_queue *que;
int error = 0;
uint32_t mask;
int i;
@@ -729,6 +729,8 @@
hw->adapter_stopped = FALSE;
hw->mac.ops.stop_adapter(hw);
callout_stop(&adapter->timer);
+ for (i = 0, que = adapter->queues; i < adapter->num_queues; i++, que++)
+ que->disabled_count = 0;
/* reprogram the RAR[0] in case user changed it. */
hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
@@ -798,7 +800,7 @@
/* Set up auto-mask */
mask = (1 << adapter->vector);
- for (i = 0; i < adapter->num_queues; i++, que++)
+ for (i = 0, que = adapter->queues; i < adapter->num_queues; i++, que++)
mask |= (1 << que->msix);
IXGBE_WRITE_REG(hw, IXGBE_VTEIAM, mask);
Home |
Main Index |
Thread Index |
Old Index