Re: [PATCH 2/7] 8139cp: Do not re-enable RX interrupts in cp_tx_timeout()

2015-09-22 Thread David Miller
From: David Woodhouse 
Date: Mon, 21 Sep 2015 15:02:07 +0100

> From: David Woodhouse 
> 
> If an RX interrupt was already received but NAPI has not yet run when
> the RX timeout happens, we end up in cp_tx_timeout() with RX interrupts
> already disabled. Blindly re-enabling them will cause an IRQ storm.
> 
> This is somewhat less painful than it was a few minutes ago before I
> fixed the return value from cp_interrupt(), but still suboptimal.
> 
> Unconditionally leave RX interrupts disabled after the reset, and
> schedule NAPI to check the receive ring and re-enable them.
> 
> Signed-off-by: David Woodhouse 

As I said, if this makes your IRQ storms go away then therefore it
obviates the need for patch #1.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/7] 8139cp: Do not re-enable RX interrupts in cp_tx_timeout()

2015-09-21 Thread David Woodhouse
From: David Woodhouse 

If an RX interrupt was already received but NAPI has not yet run when
the RX timeout happens, we end up in cp_tx_timeout() with RX interrupts
already disabled. Blindly re-enabling them will cause an IRQ storm.

This is somewhat less painful than it was a few minutes ago before I
fixed the return value from cp_interrupt(), but still suboptimal.

Unconditionally leave RX interrupts disabled after the reset, and
schedule NAPI to check the receive ring and re-enable them.

Signed-off-by: David Woodhouse 
---
 drivers/net/ethernet/realtek/8139cp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/8139cp.c 
b/drivers/net/ethernet/realtek/8139cp.c
index f1054ad..d12fc50 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1269,9 +1269,10 @@ static void cp_tx_timeout(struct net_device *dev)
rc = cp_init_rings(cp);
cp_start_hw(cp);
__cp_set_rx_mode(dev);
-   cp_enable_irq(cp);
+   cpw16_f(IntrMask, cp_norx_intr_mask);
 
netif_wake_queue(dev);
+   napi_schedule_irqoff(&cp->napi);
 
spin_unlock_irqrestore(&cp->lock, flags);
 }
-- 
2.4.3

-- 
David WoodhouseOpen Source Technology Centre
david.woodho...@intel.com  Intel Corporation


smime.p7s
Description: S/MIME cryptographic signature