Stephen Hemminger [off-list ref] writes:
quoted hunk ↗ jump to hunk
@@ -1663,6 +1678,8 @@
/* Disable interrupts by clearing the interrupt mask. */
RTL_W16 (IntrMask, 0x0000);
+ __netif_poll_disable(dev);
Rx-poll can enable interrupt. However, because it can happen on SMP
only, then reset of chips should be done sooner or later, so I don't
care so much.
+ /*
+ * This order is important
+ * (see Documentation/networking/NAPI_HOWTO.txt)
+ */
+ netif_rx_complete(dev);
+ RTL_W16_F(IntrMask, rtl8139_intr_mask);
netif_rx_complete(dev);
-- interrupted --
in rtl8139_interrupt(),
if (netif_rx_schedule_prep(dev)) {
RTL_W16_F (IntrMask, rtl8139_norx_intr_mask);
__netif_rx_schedule (dev);
}
-- resume --
/* enable interrupt, but rx-poll is already scheduling */
RTL_W16_F(IntrMask, rtl8139_intr_mask);
So doesn't disable interrupt. Umm... this problem was things that my
patch fixed. Any objections?
local_irq_disable();
__netif_rx_complete(dev);
RTL_W16_F(IntrMask, rtl8139_intr_mask);
local_irq_enable();
--
OGAWA Hirofumi [off-list ref]