From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Huy Nguyen <huyn@mellanox.com>,
Eli Cohen <eli@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 2/3] net/mlx5: Take only bit 24-26 of wqe.pftype_wq for page fault type
Date: Wed, 10 Oct 2018 18:32:43 -0700 [thread overview]
Message-ID: <20181011013244.29554-3-saeedm@mellanox.com> (raw)
In-Reply-To: <20181011013244.29554-1-saeedm@mellanox.com>
From: Huy Nguyen <huyn@mellanox.com>
The HW spec defines only bits 24-26 of pftype_wq as the page fault type,
use the required mask to ensure that.
Fixes: d9aaed838765 ("{net,IB}/mlx5: Refactor page fault handling")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
index 48864f4988a4..c1e1a16a9b07 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
@@ -273,7 +273,7 @@ static void eq_pf_process(struct mlx5_eq *eq)
case MLX5_PFAULT_SUBTYPE_WQE:
/* WQE based event */
pfault->type =
- be32_to_cpu(pf_eqe->wqe.pftype_wq) >> 24;
+ (be32_to_cpu(pf_eqe->wqe.pftype_wq) >> 24) & 0x7;
pfault->token =
be32_to_cpu(pf_eqe->wqe.token);
pfault->wqe.wq_num =
--
2.17.1
next prev parent reply other threads:[~2018-10-11 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 1:32 [pull request][net 0/3] Mellanox, mlx5 fixes 2018-10-10 Saeed Mahameed
2018-10-11 1:32 ` [net 1/3] net/mlx5: Fix memory leak when setting fpga ipsec caps Saeed Mahameed
2018-10-11 1:32 ` Saeed Mahameed [this message]
2018-10-11 1:32 ` [net 3/3] net/mlx5: WQ, fixes for fragmented WQ buffers API Saeed Mahameed
2018-10-16 4:52 ` [pull request][net 0/3] Mellanox, mlx5 fixes 2018-10-10 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011013244.29554-3-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=eli@mellanox.com \
--cc=huyn@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox