verbs.c (d892273bb5b6fe2a3b5d2d147153e35b447e9041) verbs.c (c2261dd76b549754c14c8ac7cadadd0993b182d6)
1/*
2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved.
4 * Copyright (c) 2004 Intel Corporation. All rights reserved.
5 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
8 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.

--- 1709 unchanged lines hidden (view full) ---

1718 int rc;
1719 u32 netdev_speed;
1720 struct net_device *netdev;
1721 struct ethtool_link_ksettings lksettings;
1722
1723 if (rdma_port_get_link_layer(dev, port_num) != IB_LINK_LAYER_ETHERNET)
1724 return -EINVAL;
1725
1/*
2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved.
4 * Copyright (c) 2004 Intel Corporation. All rights reserved.
5 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
8 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.

--- 1709 unchanged lines hidden (view full) ---

1718 int rc;
1719 u32 netdev_speed;
1720 struct net_device *netdev;
1721 struct ethtool_link_ksettings lksettings;
1722
1723 if (rdma_port_get_link_layer(dev, port_num) != IB_LINK_LAYER_ETHERNET)
1724 return -EINVAL;
1725
1726 if (!dev->ops.get_netdev)
1727 return -EOPNOTSUPP;
1728
1729 netdev = dev->ops.get_netdev(dev, port_num);
1726 netdev = ib_device_get_netdev(dev, port_num);
1730 if (!netdev)
1731 return -ENODEV;
1732
1733 rtnl_lock();
1734 rc = __ethtool_get_link_ksettings(netdev, &lksettings);
1735 rtnl_unlock();
1736
1737 dev_put(netdev);

--- 969 unchanged lines hidden ---
1727 if (!netdev)
1728 return -ENODEV;
1729
1730 rtnl_lock();
1731 rc = __ethtool_get_link_ksettings(netdev, &lksettings);
1732 rtnl_unlock();
1733
1734 dev_put(netdev);

--- 969 unchanged lines hidden ---