diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2011-04-06 23:24:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-07 20:36:12 -0700 |
commit | ab6dc30da55d262c54ae12e47e4a2e4372e39fbf (patch) | |
tree | fb77f6babbe4014502160bd8ddae2993ca6a1180 /drivers/net/mlx4/main.c | |
parent | 1b86a58f9d7ce4fe2377687f378fbfb53bdc9b6c (diff) | |
download | kernel_goldelico_gta04-ab6dc30da55d262c54ae12e47e4a2e4372e39fbf.zip kernel_goldelico_gta04-ab6dc30da55d262c54ae12e47e4a2e4372e39fbf.tar.gz kernel_goldelico_gta04-ab6dc30da55d262c54ae12e47e4a2e4372e39fbf.tar.bz2 |
mlx4: Sensing link type at device initialization
When bringing the port up, performing a SENSE_PORT command
To try and check to which physical link type (IB or Ethernet) the physical
port is connected.
In case there is no valid link partner, the port will come up as its
supported default.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r-- | drivers/net/mlx4/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 62fa7ee..3814fc9 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) } for (port = 1; port <= dev->caps.num_ports; port++) { + enum mlx4_port_type port_type = 0; + mlx4_SENSE_PORT(dev, port, &port_type); + if (port_type) + dev->caps.port_type[port] = port_type; ib_port_default_caps = 0; err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); if (err) @@ -958,6 +962,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) goto err_mcg_table_free; } } + mlx4_set_port_mask(dev); return 0; |