From owner-svn-src-head@freebsd.org Mon Oct 2 12:20:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E695EE3E561; Mon, 2 Oct 2017 12:20:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB79C6632B; Mon, 2 Oct 2017 12:20:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v92CKtZ4022061; Mon, 2 Oct 2017 12:20:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v92CKtnh022056; Mon, 2 Oct 2017 12:20:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201710021220.v92CKtnh022056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Oct 2017 12:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324202 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 324202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Oct 2017 12:20:57 -0000 Author: hselasky Date: Mon Oct 2 12:20:55 2017 New Revision: 324202 URL: https://svnweb.freebsd.org/changeset/base/324202 Log: Make sure the doorbell lock is valid for the i386 version of the mlx5en(4) driver. Tested by: gallatin @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Mon Oct 2 12:11:43 2017 (r324201) +++ head/sys/dev/mlx5/mlx5_en/en.h Mon Oct 2 12:20:55 2017 (r324202) @@ -800,12 +800,12 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe, int } static inline void -mlx5e_cq_arm(struct mlx5e_cq *cq) +mlx5e_cq_arm(struct mlx5e_cq *cq, spinlock_t *dblock) { struct mlx5_core_cq *mcq; mcq = &cq->mcq; - mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, NULL, cq->wq.cc); + mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, dblock, cq->wq.cc); } extern const struct ethtool_ops mlx5e_ethtool_ops; Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Oct 2 12:11:43 2017 (r324201) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Oct 2 12:20:55 2017 (r324202) @@ -1408,7 +1408,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_p if (err) return (err); - mlx5e_cq_arm(cq); + mlx5e_cq_arm(cq, MLX5_GET_DOORBELL_LOCK(&cq->priv->doorbell_lock)); return (0); } Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Mon Oct 2 12:11:43 2017 (r324201) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c Mon Oct 2 12:20:55 2017 (r324202) @@ -430,7 +430,7 @@ mlx5e_rx_cq_comp(struct mlx5_core_cq *mcq) mlx5e_post_rx_wqes(rq); } mlx5e_post_rx_wqes(rq); - mlx5e_cq_arm(&rq->cq); + mlx5e_cq_arm(&rq->cq, MLX5_GET_DOORBELL_LOCK(&rq->channel->priv->doorbell_lock)); tcp_lro_flush_all(&rq->lro); mtx_unlock(&rq->mtx); } Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Mon Oct 2 12:11:43 2017 (r324201) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c Mon Oct 2 12:20:55 2017 (r324202) @@ -574,7 +574,7 @@ mlx5e_tx_cq_comp(struct mlx5_core_cq *mcq) mtx_lock(&sq->comp_lock); mlx5e_poll_tx_cq(sq, MLX5E_BUDGET_MAX); - mlx5e_cq_arm(&sq->cq); + mlx5e_cq_arm(&sq->cq, MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); mtx_unlock(&sq->comp_lock); }