1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

mlx5en: Properly declare doorbell lock for 32-bit CPUs.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2016-09-16 11:45:35 +00:00
parent 5eadc44ceb
commit 81b3cdc1bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305872
2 changed files with 4 additions and 1 deletions

View File

@ -662,6 +662,7 @@ struct mlx5e_priv {
struct work_struct update_stats_work;
struct work_struct update_carrier_work;
struct work_struct set_rx_mode_work;
MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock)
struct mlx5_core_dev *mdev;
struct ifnet *ifp;
@ -784,7 +785,8 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe, int bf_sz)
wmb();
} else {
mlx5_write64(wqe, sq->uar.map + ofst, NULL);
mlx5_write64(wqe, sq->uar.map + ofst,
MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock));
}
sq->bf_offset ^= sq->bf_buf_size;

View File

@ -2753,6 +2753,7 @@ mlx5e_priv_mtx_init(struct mlx5e_priv *priv)
mtx_init(&priv->async_events_mtx, "mlx5async", MTX_NETWORK_LOCK, MTX_DEF);
sx_init(&priv->state_lock, "mlx5state");
callout_init_mtx(&priv->watchdog, &priv->async_events_mtx, 0);
MLX5_INIT_DOORBELL_LOCK(&priv->doorbell_lock);
}
static void