Commit 502c1a16 authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller

cxgb4vf: Revert force link up behaviour

Reverting force link up changes since this behaviour can be
achieved using VF link state feature.

Reverts:
commit 0913667a ("cxgb4vf: Forcefully link up virtual interfaces")
Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8b965f3f
...@@ -155,6 +155,8 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok) ...@@ -155,6 +155,8 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok)
const char *fc; const char *fc;
const struct port_info *pi = netdev_priv(dev); const struct port_info *pi = netdev_priv(dev);
netif_carrier_on(dev);
switch (pi->link_cfg.speed) { switch (pi->link_cfg.speed) {
case 100: case 100:
s = "100Mbps"; s = "100Mbps";
...@@ -200,6 +202,7 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok) ...@@ -200,6 +202,7 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok)
netdev_info(dev, "link up, %s, full-duplex, %s PAUSE\n", s, fc); netdev_info(dev, "link up, %s, full-duplex, %s PAUSE\n", s, fc);
} else { } else {
netif_carrier_off(dev);
netdev_info(dev, "link down\n"); netdev_info(dev, "link down\n");
} }
} }
...@@ -339,16 +342,6 @@ static int link_start(struct net_device *dev) ...@@ -339,16 +342,6 @@ static int link_start(struct net_device *dev)
if (ret == 0) if (ret == 0)
ret = t4vf_enable_pi(pi->adapter, pi, true, true); ret = t4vf_enable_pi(pi->adapter, pi, true, true);
/* The Virtual Interfaces are connected to an internal switch on the
* chip which allows VIs attached to the same port to talk to each
* other even when the port link is down. As a result, we generally
* want to always report a VI's link as being "up", provided there are
* no errors in enabling vi.
*/
if (ret == 0)
netif_carrier_on(dev);
return ret; return ret;
} }
......
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