On Mon, 03 May 2010 23:18:56 +0900
Mike McCormack <mikem@ring3k.org> wrote:
How could NAPI trigger a TX restart? Restart is a timer, not controlled
by NAPI. There is a different race that your patch isn't covering.
If a large MTU send is in progress while mtu is changing, the changes
to the GMAC store and forward (sky2_set_tx_stfwd) are not synchronized
with hardware queued transmits.
So I think a there needs to be another spinloop.
--- a/drivers/net/sky2.c 2010-05-03 16:19:58.828106182 -0700
+++ b/drivers/net/sky2.c 2010-05-03 16:24:37.850232475 -0700
@@ -2274,8 +2274,12 @@ static int sky2_change_mtu(struct net_de
imask = sky2_read32(hw, B0_IMSK);
sky2_write32(hw, B0_IMSK, 0);
- dev->trans_start = jiffies; /* prevent tx timeout */
netif_stop_queue(dev);
+
+ /* Wait for ongoing Tx to complete */
+ while (sky2->tx_cons != sky2->tx_prod)
+ udelay(10);
+
napi_disable(&hw->napi);
synchronize_irq(hw->pdev->irq);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html