Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 12:25:00 +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-12@freebsd.org
Subject:   svn commit: r341937 - in stable/12/sys/dev/mlx5: . mlx5_core
Message-ID:  <201812121225.wBCCP0E4080358@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Dec 12 12:25:00 2018
New Revision: 341937
URL: https://svnweb.freebsd.org/changeset/base/341937

Log:
  MFC r341562:
  mlx5: Extend vector argument to u64.
  
  Else the MLX5_TRIGGERED_CMD_COMP flag will be masked away.
  
  Sponsored by:   Mellanox Technologies

Modified:
  stable/12/sys/dev/mlx5/driver.h
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/driver.h
==============================================================================
--- stable/12/sys/dev/mlx5/driver.h	Wed Dec 12 12:23:56 2018	(r341936)
+++ stable/12/sys/dev/mlx5/driver.h	Wed Dec 12 12:25:00 2018	(r341937)
@@ -984,7 +984,7 @@ void mlx5_cq_completion(struct mlx5_core_dev *dev, u32
 void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type);
 void mlx5_srq_event(struct mlx5_core_dev *dev, u32 srqn, int event_type);
 struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn);
-void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector);
+void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector);
 void mlx5_cq_event(struct mlx5_core_dev *dev, u32 cqn, int event_type);
 int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx,
 		       int nent, u64 mask, const char *name, struct mlx5_uar *uar);

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
==============================================================================
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c	Wed Dec 12 12:23:56 2018	(r341936)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_cmd.c	Wed Dec 12 12:25:00 2018	(r341937)
@@ -1179,10 +1179,12 @@ static void free_msg(struct mlx5_core_dev *dev, struct
 	}
 }
 
-void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u32 vector)
+void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vector_flags)
 {
 	struct mlx5_cmd *cmd = &dev->cmd;
 	struct mlx5_cmd_work_ent *ent;
+	bool triggered = (vector_flags & MLX5_TRIGGERED_CMD_COMP) ? 1 : 0;
+	u32 vector = vector_flags; /* discard flags in the upper dword */
 	int i;
 
 	/* make sure data gets read from RAM */
@@ -1206,7 +1208,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, 
 			else
 				ent->ret = 0;
 			ent->status = ent->lay->status_own >> 1;
-			if (vector & MLX5_TRIGGERED_CMD_COMP)
+			if (triggered)
 				ent->status = MLX5_DRIVER_STATUS_ABORTED;
 			else
 				ent->status = ent->lay->status_own >> 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812121225.wBCCP0E4080358>