Add support for reporting physical state when calling query_port() via the sysfs interface. Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx> --- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index d169a8031375..c678b05bb829 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -105,10 +105,13 @@ static int i40iw_query_port(struct ib_device *ibdev, props->active_mtu = ib_mtu_int_to_enum(netdev->mtu); props->lid = 1; - if (netif_carrier_ok(iwdev->netdev)) + if (netif_carrier_ok(iwdev->netdev)) { props->state = IB_PORT_ACTIVE; - else + props->phys_state = 5; + } else { props->state = IB_PORT_DOWN; + props->phys_state = 3; + } props->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_REINIT_SUP | IB_PORT_VENDOR_CLASS_SUP | IB_PORT_BOOT_MGMT_SUP; props->gid_tbl_len = 1; -- 2.20.1