sense.c (e4da3fbfbd1de56d2367653e3823e6445e49f8a9) sense.c (f9baff509f8a05a79626defdbdf4f4aa4efd373b)
1/*
2 * Copyright (c) 2007 Mellanox Technologies. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 31 unchanged lines hidden (view full) ---

40
41int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
42 enum mlx4_port_type *type)
43{
44 u64 out_param;
45 int err = 0;
46
47 err = mlx4_cmd_imm(dev, 0, &out_param, port, 0,
1/*
2 * Copyright (c) 2007 Mellanox Technologies. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:

--- 31 unchanged lines hidden (view full) ---

40
41int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port,
42 enum mlx4_port_type *type)
43{
44 u64 out_param;
45 int err = 0;
46
47 err = mlx4_cmd_imm(dev, 0, &out_param, port, 0,
48 MLX4_CMD_SENSE_PORT, MLX4_CMD_TIME_CLASS_B);
48 MLX4_CMD_SENSE_PORT, MLX4_CMD_TIME_CLASS_B,
49 MLX4_CMD_WRAPPED);
49 if (err) {
50 mlx4_err(dev, "Sense command failed for port: %d\n", port);
51 return err;
52 }
53
54 if (out_param > 2) {
55 mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", out_param);
56 return -EINVAL;

--- 100 unchanged lines hidden ---
50 if (err) {
51 mlx4_err(dev, "Sense command failed for port: %d\n", port);
52 return err;
53 }
54
55 if (out_param > 2) {
56 mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", out_param);
57 return -EINVAL;

--- 100 unchanged lines hidden ---