OSDN Git Service

sfc: don't update stats on VF when called in atomic context
authorDaniel Pieczko <dpieczko@solarflare.com>
Tue, 2 Jun 2015 10:40:18 +0000 (11:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jun 2015 19:57:29 +0000 (12:57 -0700)
commitf00bf2305cabc2313c70575384aee60e8f2a684d
tree7a10c2249196c569f8c6c72866605eb23c3419fd
parentd94619cdfc561eee18e2d40ab6563e3f2f072fdd
sfc: don't update stats on VF when called in atomic context

The ifenslave command to set up a bond runs in an atomic
context, and it queries the stats on the devices that are
being enslaved. A VF needs to make an MCDI call to update
its stats, which is not allowed in atomic context.

The releasing of the stats_lock is moved to the beginning of
the VF stats update function so that in_interrupt() can be
used; it must be taken again before returning from this
function.

Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ef10.c