diff options
-rw-r--r-- | drivers/net/mlx4/main.c | 5 | ||||
-rw-r--r-- | drivers/net/mlx4/mlx4.h | 2 | ||||
-rw-r--r-- | drivers/net/mlx4/sense.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 62fa7eec5f0c..3814fc9b1145 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -944,6 +944,10 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
944 | } | 944 | } |
945 | 945 | ||
946 | for (port = 1; port <= dev->caps.num_ports; port++) { | 946 | for (port = 1; port <= dev->caps.num_ports; port++) { |
947 | enum mlx4_port_type port_type = 0; | ||
948 | mlx4_SENSE_PORT(dev, port, &port_type); | ||
949 | if (port_type) | ||
950 | dev->caps.port_type[port] = port_type; | ||
947 | ib_port_default_caps = 0; | 951 | ib_port_default_caps = 0; |
948 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); | 952 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); |
949 | if (err) | 953 | if (err) |
@@ -958,6 +962,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
958 | goto err_mcg_table_free; | 962 | goto err_mcg_table_free; |
959 | } | 963 | } |
960 | } | 964 | } |
965 | mlx4_set_port_mask(dev); | ||
961 | 966 | ||
962 | return 0; | 967 | return 0; |
963 | 968 | ||
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index c1e0e5f1bcdb..dd7d745fbab4 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h | |||
@@ -431,6 +431,8 @@ void mlx4_srq_event(struct mlx4_dev *dev, u32 srqn, int event_type); | |||
431 | 431 | ||
432 | void mlx4_handle_catas_err(struct mlx4_dev *dev); | 432 | void mlx4_handle_catas_err(struct mlx4_dev *dev); |
433 | 433 | ||
434 | int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, | ||
435 | enum mlx4_port_type *type); | ||
434 | void mlx4_do_sense_ports(struct mlx4_dev *dev, | 436 | void mlx4_do_sense_ports(struct mlx4_dev *dev, |
435 | enum mlx4_port_type *stype, | 437 | enum mlx4_port_type *stype, |
436 | enum mlx4_port_type *defaults); | 438 | enum mlx4_port_type *defaults); |
diff --git a/drivers/net/mlx4/sense.c b/drivers/net/mlx4/sense.c index 015fbe785c13..e2337a7411d9 100644 --- a/drivers/net/mlx4/sense.c +++ b/drivers/net/mlx4/sense.c | |||
@@ -38,8 +38,8 @@ | |||
38 | 38 | ||
39 | #include "mlx4.h" | 39 | #include "mlx4.h" |
40 | 40 | ||
41 | static int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, | 41 | int mlx4_SENSE_PORT(struct mlx4_dev *dev, int port, |
42 | enum mlx4_port_type *type) | 42 | enum mlx4_port_type *type) |
43 | { | 43 | { |
44 | u64 out_param; | 44 | u64 out_param; |
45 | int err = 0; | 45 | int err = 0; |