sfc: Disable soft interrupt handling during efx_device_detach_sync()
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 5 Mar 2013 01:03:47 +0000 (01:03 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 27 Mar 2013 02:41:10 +0000 (02:41 +0000)
commitfe58ada6be173509b8caf9acc1187b601ab4875d
treec5a12742aacb0eb5dd1d78f24c8791819ebb1f78
parent0a8a03d9bdd0b971b28ef69c3d1b70b446985fc8
sfc: Disable soft interrupt handling during  efx_device_detach_sync()

[ Upstream commit 35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad ]

efx_device_detach_sync() locks all TX queues before marking the device
detached and thus disabling further TX scheduling.  But it can still
be interrupted by TX completions which then result in TX scheduling in
soft interrupt context.  This will deadlock when it tries to acquire
a TX queue lock that efx_device_detach_sync() already acquired.

To avoid deadlock, we must use netif_tx_{,un}lock_bh().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/sfc/efx.h