Author: slavash
Date: Wed Dec  5 13:44:38 2018
New Revision: 341562
URL: https://svnweb.freebsd.org/changeset/base/341562

Log:
  mlx5: Extend vector argument to u64.
  
  Else the MLX5_TRIGGERED_CMD_COMP flag will be masked away.
  
  Submitted by:   hselasky@
  Approved by:    hselasky (mentor)
  MFC after:      1 week
  Sponsored by:   Mellanox Technologies

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c

Modified: head/sys/dev/mlx5/driver.h
==============================================================================
--- head/sys/dev/mlx5/driver.h  Wed Dec  5 13:44:08 2018        (r341561)
+++ head/sys/dev/mlx5/driver.h  Wed Dec  5 13:44:38 2018        (r341562)
@@ -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: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c      Wed Dec  5 13:44:08 2018        
(r341561)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c      Wed Dec  5 13:44:38 2018        
(r341562)
@@ -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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to