diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2010-11-11 21:05:58 (GMT) |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-12-02 00:11:29 (GMT) |
commit | 21d606090ec1aacc998276f5af34c43a88f01218 (patch) | |
tree | bdf6ab404ad18c7deccedf14268e24ca1e0b3941 /drivers/infiniband/hw/mlx4 | |
parent | 328266c561153a0c19084088d5dacd40632dc7ae (diff) | |
download | linux-fsl-qoriq-21d606090ec1aacc998276f5af34c43a88f01218.tar.xz |
IB/mlx4: Fix IBoE link state
Use netif_running() and netif_carrier_ok() to report link state,
exactly as is done to report Ethernet link state in sysfs.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index e165dd3..30e09ca 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -242,7 +242,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, tmp = iboe_get_mtu(ndev->mtu); props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; - props->state = netif_running(ndev) && netif_oper_up(ndev) ? + props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ? IB_PORT_ACTIVE : IB_PORT_DOWN; props->phys_state = state_to_phys_state(props->state); |