igc: Change adapter->nfc_rule_lock to mutex
authorAndre Guedes <andre.guedes@intel.com>
Fri, 24 Apr 2020 20:16:22 +0000 (13:16 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 23 May 2020 01:21:52 +0000 (18:21 -0700)
commit42fc5dc042796a825d9e2db8ee4cd977b12f73d1
tree04f26e92079cff89af8f5e05a3b50266dad31116
parentacda576f72b8a2eed44aa3840561daa0ce837744
igc: Change adapter->nfc_rule_lock to mutex

This patch changes adapter->nfc_rule_lock type from spin_lock to mutex
so we avoid unnecessary busy waiting on lock contention.

A closer look at the execution context of NFC rule API users shows that
all of them run in process context. The API users are: ethtool ops,
igc_configure(), called when interface is brought up by user or reset
workequeue thread, igc_down(), called when interface is brought down,
and igc_remove(), called when driver is unloaded.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc.h
drivers/net/ethernet/intel/igc/igc_ethtool.c
drivers/net/ethernet/intel/igc/igc_main.c