diff options
author | Lucas Tanure <tanure@linux.com> | 2024-01-28 13:18:49 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-01 02:18:00 +0300 |
commit | 96b93f08357c4cc858ec7543464f07e461e5713a (patch) | |
tree | 0860cd644279223ad8345ce337fb11e179a261f4 /drivers/net/ethernet/microchip | |
parent | e7f8df0e81bf73ab6dc6ac1dc01273fa06564119 (diff) | |
download | linux-96b93f08357c4cc858ec7543464f07e461e5713a.tar.xz |
ptp: lan743x: Use spin_lock instead of spin_lock_bh
lan743x_ptp_request_tx_timestamp uses spin_lock_bh, but it is
only called from lan743x_tx_xmit_frame where all IRQs are
already disabled.
This fixes the "IRQs not enabled as expected" warning.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Link: https://lore.kernel.org/r/20240128101849.107298-1-tanure@linux.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/microchip')
-rw-r--r-- | drivers/net/ethernet/microchip/lan743x_ptp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c index 2f04bc77a118..2801f08bf1c9 100644 --- a/drivers/net/ethernet/microchip/lan743x_ptp.c +++ b/drivers/net/ethernet/microchip/lan743x_ptp.c @@ -1712,13 +1712,13 @@ bool lan743x_ptp_request_tx_timestamp(struct lan743x_adapter *adapter) struct lan743x_ptp *ptp = &adapter->ptp; bool result = false; - spin_lock_bh(&ptp->tx_ts_lock); + spin_lock(&ptp->tx_ts_lock); if (ptp->pending_tx_timestamps < LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS) { /* request granted */ ptp->pending_tx_timestamps++; result = true; } - spin_unlock_bh(&ptp->tx_ts_lock); + spin_unlock(&ptp->tx_ts_lock); return result; } |