]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sfc: Detach net device when stopping queues for reconfiguration
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 28 Jan 2013 19:01:06 +0000 (19:01 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 27 Mar 2013 02:41:10 +0000 (02:41 +0000)
commit0a8a03d9bdd0b971b28ef69c3d1b70b446985fc8
tree8884a817f8ffcbe520e30a3d6152a615fb0d7f4e
parent7a825480915c0d846c3f152f210fe22a5cc7a95f
sfc: Detach net device when stopping queues for  reconfiguration

[ Upstream commit 29c69a4882641285a854d6d03ca5adbba68c0034 ]

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.

The device is ready if all the following are true:

(a) It has a qdisc
(b) It is marked present
(c) It is running
(d) The link is reported up

(a) and (c) are normally true, and must not be changed by a driver.
(d) is under our control, but fake link changes may disturb userland.
This leaves (b).  We already mark the device absent during reset
and self-test, but we need to do the same during MTU changes and ring
reallocation.  We don't need to do this when the device is brought
down because then (c) is already false.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/sfc/efx.c