aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-03-01 23:20:20 -0800
committerDavid S. Miller <davem@davemloft.net>2019-03-01 23:20:20 -0800
commit0960004bebdb803ec286ddfea703a9ab7bf5ab20 (patch)
tree897f15c8209dffb8ba0f81376ff77fbad2c835ed /drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
parentcxgb4vf: Prefix adapter flags with CXGB4VF (diff)
parentcxgb4vf: Revert force link up behaviour (diff)
downloadlinux-dev-0960004bebdb803ec286ddfea703a9ab7bf5ab20.tar.xz
linux-dev-0960004bebdb803ec286ddfea703a9ab7bf5ab20.zip
Merge branch 'cxgb4-vf-link-state'
Arjun Vynipadath says: ==================== cxgb4/cxgb4vf: VF link state support This series of patches adds support for ndo_set_vf_link_state in cxgb4 driver. Patch 1 implements ndo_set_vf_link_state Patch 2 reverts the existing force_link_up behaviour for cxgb4vf driver. v2: - Using reverse christmas tree for variable declaration in Patch 1 - Patch 2 has no change ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 6b2754a574d6..62fd1250ff7e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -155,6 +155,8 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok)
const char *fc;
const struct port_info *pi = netdev_priv(dev);
+ netif_carrier_on(dev);
+
switch (pi->link_cfg.speed) {
case 100:
s = "100Mbps";
@@ -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);
} else {
+ netif_carrier_off(dev);
netdev_info(dev, "link down\n");
}
}
@@ -339,16 +342,6 @@ static int link_start(struct net_device *dev)
if (ret == 0)
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;
}