net/mlx5: Take only bit 24-26 of wqe.pftype_wq for page fault type
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / eq.c
index 48864f4988a4efa7f60f98c239daaad554395569..c1e1a16a9b07d4335bb4cdc3b29bdea3673b8fa2 100644 (file)
@@ -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 =