diff options
| author | Muhammad Husaini Zulkifli <[email protected]> | 2023-08-07 20:51:29 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-08-08 23:36:23 +0000 |
| commit | 06b412589eef780b792e73df131d35dc43cc4a49 (patch) | |
| tree | 0fb28ac74ffbde3be8e0a8e846f7e0d40fb50a9b /drivers/net/ethernet/intel/igc/igc.h | |
| parent | Merge tag 'mlx5-fixes-2023-08-07' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
| download | kernel-06b412589eef780b792e73df131d35dc43cc4a49.tar.gz kernel-06b412589eef780b792e73df131d35dc43cc4a49.zip | |
igc: Add lock to safeguard global Qbv variables
Access to shared variables through hrtimer requires locking in order
to protect the variables because actions to write into these variables
(oper_gate_closed, admin_gate_closed, and qbv_transition) might potentially
occur simultaneously. This patch provides a locking mechanisms to avoid
such scenarios.
Fixes: 175c241288c0 ("igc: Fix TX Hang issue when QBV Gate is closed")
Suggested-by: Leon Romanovsky <[email protected]>
Signed-off-by: Muhammad Husaini Zulkifli <[email protected]>
Tested-by: Naama Meir <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc.h')
| -rw-r--r-- | drivers/net/ethernet/intel/igc/igc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 9db384f66a8e..38901d2a4680 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -195,6 +195,10 @@ struct igc_adapter { u32 qbv_config_change_errors; bool qbv_transition; unsigned int qbv_count; + /* Access to oper_gate_closed, admin_gate_closed and qbv_transition + * are protected by the qbv_tx_lock. + */ + spinlock_t qbv_tx_lock; /* OS defined structs */ struct pci_dev *pdev; |
