Lines Matching refs:dev
41 int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
47 err = mlx4_cmd_imm(dev, 0, &out_param, port, 0,
51 mlx4_err(dev, "Sense command failed for port: %d\n", port);
56 mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", (unsigned long long)out_param);
64 void mlx4_do_sense_ports(struct mlx4_dev *dev,
68 struct mlx4_sense *sense = &mlx4_priv(dev)->sense;
72 for (i = 1; i <= dev->caps.num_ports; i++) {
75 dev->caps.possible_type[i] == MLX4_PORT_TYPE_AUTO) {
76 err = mlx4_SENSE_PORT(dev, i, &stype[i - 1]);
86 for (i = 0; i < dev->caps.num_ports; i++)
96 struct mlx4_dev *dev = sense->dev;
97 struct mlx4_priv *priv = mlx4_priv(dev);
101 mlx4_do_sense_ports(dev, stype, &dev->caps.port_type[1]);
103 if (mlx4_check_port_params(dev, stype))
106 if (mlx4_change_port_types(dev, stype))
107 mlx4_err(dev, "Failed to change port_types\n");
115 void mlx4_start_sense(struct mlx4_dev *dev)
117 struct mlx4_priv *priv = mlx4_priv(dev);
120 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP))
127 void mlx4_stop_sense(struct mlx4_dev *dev)
129 cancel_delayed_work_sync(&mlx4_priv(dev)->sense.sense_poll);
132 void mlx4_sense_init(struct mlx4_dev *dev)
134 struct mlx4_priv *priv = mlx4_priv(dev);
138 sense->dev = dev;
139 for (port = 1; port <= dev->caps.num_ports; port++)