Commit 21d60609 authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier

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: default avatarEli Cohen <eli@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 328266c5
...@@ -242,7 +242,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, ...@@ -242,7 +242,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
tmp = iboe_get_mtu(ndev->mtu); tmp = iboe_get_mtu(ndev->mtu);
props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; 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; IB_PORT_ACTIVE : IB_PORT_DOWN;
props->phys_state = state_to_phys_state(props->state); props->phys_state = state_to_phys_state(props->state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment