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 legacy interrupt problem. If the INT...
details: https://anonhg.NetBSD.org/src/rev/64754de2ebaa
branches: trunk
changeset: 335546:64754de2ebaa
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jan 13 03:11:34 2015 +0000
description:
Fix a legacy interrupt problem. If the INTx line was shared with another
device, the ixgbe_legacy_irq() enabled the interrupt even if the interface
was down. Check the interface state and call functions appropriately.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diffs (57 lines):
diff -r 32f8b44e4964 -r 64754de2ebaa sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Tue Jan 13 02:37:20 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Jan 13 03:11:34 2015 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.14 2014/04/21 16:35:06 chs Exp $*/
+/*$NetBSD: ixgbe.c,v 1.15 2015/01/13 03:11:34 msaitoh Exp $*/
#include "opt_inet.h"
@@ -1478,30 +1478,33 @@
{
struct ix_queue *que = arg;
struct adapter *adapter = que->adapter;
+ struct ifnet *ifp = adapter->ifp;
struct ixgbe_hw *hw = &adapter->hw;
struct tx_ring *txr = adapter->tx_rings;
- bool more_tx, more_rx;
+ bool more_tx = false, more_rx = false;
u32 reg_eicr, loop = MAX_LOOP;
-
reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
adapter->stats.legint.ev_count++;
++que->irqs;
if (reg_eicr == 0) {
adapter->stats.intzero.ev_count++;
- ixgbe_enable_intr(adapter);
+ if ((ifp->if_flags & IFF_UP) != 0)
+ ixgbe_enable_intr(adapter);
return 0;
}
- more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
-
- IXGBE_TX_LOCK(txr);
- do {
- adapter->txloops.ev_count++;
- more_tx = ixgbe_txeof(txr);
- } while (loop-- && more_tx);
- IXGBE_TX_UNLOCK(txr);
+ if ((ifp->if_flags & IFF_RUNNING) != 0) {
+ more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
+
+ IXGBE_TX_LOCK(txr);
+ do {
+ adapter->txloops.ev_count++;
+ more_tx = ixgbe_txeof(txr);
+ } while (loop-- && more_tx);
+ IXGBE_TX_UNLOCK(txr);
+ }
if (more_rx || more_tx) {
if (more_rx)
Home |
Main Index |
Thread Index |
Old Index