]> git.baikalelectronics.ru Git - kernel.git/commit
sh_eth: Detach net device when stopping queue to resize DMA rings
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Thu, 22 Jan 2015 12:40:25 +0000 (12:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jan 2015 00:13:15 +0000 (16:13 -0800)
commit8bbaefada5f939926f3b509231b676a0f53770e1
tree7a659481ceabb22aa47ff25ddc65848e96f5879b
parentcc51bae3067d8be314c0f2b5ebe351280cb57288
sh_eth: Detach net device when stopping queue to resize DMA rings

We must only ever stop TX queues when they are full or the net device
is not 'ready' so far as the net core, and specifically the watchdog,
is concerned.  Otherwise, the watchdog may fire *immediately* if no
packets have been added to the queue in the last 5 seconds.

What's more, sh_eth_tx_timeout() will likely crash if called while
we're resizing the TX ring.

I could easily trigger this by running the loop:

   while ethtool -G eth0 rx 128 && ethtool -G eth0 rx 64; do echo -n .; done

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c