]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Remove atomic operations on ptp->tx_avail
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Fri, 28 Jun 2024 19:30:05 +0000 (12:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jul 2024 10:23:22 +0000 (11:23 +0100)
commit060338390787ccbfd71f0796d420b7cd063bcac6
treef407e8ebf4907278a4d4179483e836a06c28ac24
parent8aa2a79e9b95eadec5c2a97662adb5b0a8f333ad
bnxt_en: Remove atomic operations on ptp->tx_avail

Now that we require the spinlock to protect ptp->txts_prod, change
ptp->tx_avail to non-atomic and protect it under the same spinlock.
Add a new helper function bnxt_ptp_get_txts_prod() to decrement
ptp->tx_avail under spinlock and return the producer.

Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h