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 <bhutchings@solarflare.com>
Wed, 6 Mar 2013 17:57:24 +0000 (17:57 +0000)
commit35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad
treeec2e3823eb0aa38d914acdf4d1c4aa752f2a8b49
parent29c69a4882641285a854d6d03ca5adbba68c0034
sfc: Disable soft interrupt handling during efx_device_detach_sync()

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>
drivers/net/ethernet/sfc/efx.h