Make query_port not report port_down always.
authorKanoj Sarcar <kanoj@google.com>
Mon, 22 Feb 2016 23:35:17 +0000 (15:35 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 23 Feb 2016 16:11:26 +0000 (11:11 -0500)
Hack existing linux logic to avoid netdev stuff that was reporting port_down
always.

Signed-off-by: Kanoj Sarcar <kanoj@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/mlx4u/main.c

index b662f81..68970bf 100644 (file)
@@ -411,11 +411,13 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
        if (is_bonded)
                rtnl_lock(); /* required to get upper dev */
        spin_lock_bh(&iboe->lock);
+#if 0  /* AKAROS */
        ndev = iboe->netdevs[port - 1];
        if (ndev && is_bonded)
                ndev = netdev_master_upper_dev_get(ndev);
        if (!ndev)
                goto out_unlock;
+#endif /* AKAROS */
 
        tmp = iboe_get_mtu(ndev->mtu);
        props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256;