i40e: hold the RTNL lock while changing interrupt schemes
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 16 Mar 2018 08:26:35 +0000 (01:26 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 26 Mar 2018 20:52:53 +0000 (13:52 -0700)
commitf0ee70a042e267a517e943220e18ae62d3c1995a
tree0b8f254c152177dc6318a302dcbf1ae35251f0e4
parent5f76a704b8df9b4da898a230ac40d143eaca9cd8
i40e: hold the RTNL lock while changing interrupt schemes

When we suspend and resume, we need to clear and re-enable the interrupt
scheme. This was previously not done while holding the RTNL lock, which
could be problematic, because we are actually destroying and re-creating
queues.

Hold the RTNL lock for the entire sequence of preparing for reset, and
when resuming. This additionally protects the flags related to interrupt
scheme under RTNL lock so that their modification is properly threaded.

This is part of a larger effort to remove the need for cmpxchg64 in
i40e_set_priv_flags().

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c