aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igc/igc.h
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@intel.com>2020-04-24 13:16:22 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-05-22 18:21:52 -0700
commit42fc5dc042796a825d9e2db8ee4cd977b12f73d1 (patch)
tree04f26e92079cff89af8f5e05a3b50266dad31116 /drivers/net/ethernet/intel/igc/igc.h
parentigc: Change return type from igc_disable_nfc_rule() (diff)
downloadlinux-dev-42fc5dc042796a825d9e2db8ee4cd977b12f73d1.tar.xz
linux-dev-42fc5dc042796a825d9e2db8ee4cd977b12f73d1.zip
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc.h')
-rw-r--r--drivers/net/ethernet/intel/igc/igc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index a484b328268b..14f9edaaaf83 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -190,7 +190,7 @@ struct igc_adapter {
/* Any access to elements in nfc_rule_list is protected by the
* nfc_rule_lock.
*/
- spinlock_t nfc_rule_lock;
+ struct mutex nfc_rule_lock;
struct list_head nfc_rule_list;
unsigned int nfc_rule_count;