Skip to content

Commit

Permalink
ptp: lan743x: Use spin_lock instead of spin_lock_bh
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lucas Tanure authored and Jakub Kicinski committed Jan 31, 2024
1 parent e7f8df0 commit 96b93f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/microchip/lan743x_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 96b93f0

Please sign in to comment.