Date: Fri, 23 Sep 2016 08:23:11 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306238 - stable/11/sys/dev/mlx5/mlx5_en Message-ID: <201609230823.u8N8NBfu049930@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Sep 23 08:23:11 2016 New Revision: 306238 URL: https://svnweb.freebsd.org/changeset/base/306238 Log: MFC r305872: mlx5en: Properly declare doorbell lock for 32-bit CPUs. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:22:30 2016 (r306237) +++ stable/11/sys/dev/mlx5/mlx5_en/en.h Fri Sep 23 08:23:11 2016 (r306238) @@ -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, 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; Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:22:30 2016 (r306237) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 23 08:23:11 2016 (r306238) @@ -2753,6 +2753,7 @@ mlx5e_priv_mtx_init(struct mlx5e_priv *p 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609230823.u8N8NBfu049930>