Merge branch 'mlx5-next' into rdma.git for-next
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 21 Feb 2019 19:40:18 +0000 (12:40 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 Feb 2019 19:40:18 +0000 (12:40 -0700)
From
git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux

To resolve conflicts with net-next and pick up the first patch.

* branch 'mlx5-next':
  net/mlx5: Factor out HCA capabilities functions
  IB/mlx5: Add support for 50Gbps per lane link modes
  net/mlx5: Add support to ext_* fields introduced in Port Type and Speed register
  net/mlx5: Add new fields to Port Type and Speed register
  net/mlx5: Refactor queries to speed fields in Port Type and Speed register
  net/mlx5: E-Switch, Avoid magic numbers when initializing offloads mode
  net/mlx5: Relocate vport macros to the vport header file
  net/mlx5: E-Switch, Normalize the name of uplink vport number
  net/mlx5: Provide an alternative VF upper bound for ECPF
  net/mlx5: Add host params change event
  net/mlx5: Add query host params command
  net/mlx5: Update enable HCA dependency
  net/mlx5: Introduce Mellanox SmartNIC and modify page management logic
  IB/mlx5: Use unified register/load function for uplink and VF vports
  net/mlx5: Use consistent vport num argument type
  net/mlx5: Use void pointer as the type in address_of macro
  net/mlx5: Align ODP capability function with netdev coding style
  mlx5: use RCU lock in mlx5_eq_cq_get()

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1  2 
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
include/linux/mlx5/driver.h

@@@ -46,31 -47,17 +47,17 @@@ static const struct mlx5_ib_profile vf_
  };
  
  static int
- mlx5_ib_nic_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
- {
-       struct mlx5_ib_dev *ibdev;
-       ibdev = mlx5_ib_rep_to_dev(rep);
-       if (!__mlx5_ib_add(ibdev, ibdev->profile))
-               return -EINVAL;
-       return 0;
- }
- static void
- mlx5_ib_nic_rep_unload(struct mlx5_eswitch_rep *rep)
- {
-       struct mlx5_ib_dev *ibdev;
-       ibdev = mlx5_ib_rep_to_dev(rep);
-       __mlx5_ib_remove(ibdev, ibdev->profile, MLX5_IB_STAGE_MAX);
- }
- static int
  mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
  {
+       const struct mlx5_ib_profile *profile;
        struct mlx5_ib_dev *ibdev;
  
 -      ibdev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*ibdev));
+       if (rep->vport == MLX5_VPORT_UPLINK)
+               profile = &uplink_rep_profile;
+       else
+               profile = &vf_rep_profile;
 +      ibdev = ib_alloc_device(mlx5_ib_dev, ib_dev);
        if (!ibdev)
                return -ENOMEM;
  
        ibdev->mdev = dev;
        ibdev->num_ports = max(MLX5_CAP_GEN(dev, num_ports),
                               MLX5_CAP_GEN(dev, num_vhca_ports));
-       if (!__mlx5_ib_add(ibdev, &rep_profile)) {
 -      if (!__mlx5_ib_add(ibdev, profile))
++      if (!__mlx5_ib_add(ibdev, profile)) {
 +              ib_dealloc_device(&ibdev->ib_dev);
                return -EINVAL;
 +      }
  
        rep->rep_if[REP_IB].priv = ibdev;
  
Simple merge
@@@ -1126,17 -1122,9 +1126,17 @@@ static int mlx5e_rep_get_phys_port_name
        struct mlx5e_priv *priv = netdev_priv(dev);
        struct mlx5e_rep_priv *rpriv = priv->ppriv;
        struct mlx5_eswitch_rep *rep = rpriv->rep;
 -      int ret;
 +      int ret, pf_num;
 +
 +      ret = mlx5_lag_get_pf_num(priv->mdev, &pf_num);
 +      if (ret)
 +              return ret;
 +
-       if (rep->vport == FDB_UPLINK_VPORT)
++      if (rep->vport == MLX5_VPORT_UPLINK)
 +              ret = snprintf(buf, len, "p%d", pf_num);
 +      else
 +              ret = snprintf(buf, len, "pf%dvf%d", pf_num, rep->vport - 1);
  
 -      ret = snprintf(buf, len, "%d", rep->vport - 1);
        if (ret >= len)
                return -EOPNOTSUPP;
  
Simple merge