1
0
Fork 0

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>
hifive-unleashed-5.1
Eli Cohen 2010-11-11 21:05:58 +00:00 committed by Roland Dreier
parent 328266c561
commit 21d606090e
1 changed files with 1 additions and 1 deletions

View File

@ -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);