netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arjun Vynipadath <arjun@chelsio.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: nirranjan@chelsio.com, indranil@chelsio.com, dt@chelsio.com,
	Arjun Vynipadath <arjun@chelsio.com>,
	Vishal Kulkarni <vishal@chelsio.com>
Subject: [PATCH net-next v2 2/2] cxgb4vf: Revert force link up behaviour
Date: Fri,  1 Mar 2019 15:44:48 +0530	[thread overview]
Message-ID: <20190301101448.9314-3-arjun@chelsio.com> (raw)
In-Reply-To: <20190301101448.9314-1-arjun@chelsio.com>

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

Reverts:
commit 0913667ab3ad ("cxgb4vf: Forcefully link up virtual interfaces")

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
---
v2:
- No changes
---
 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 13 +++----------
 1 file 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 3300b69a42b3..ed888227d81d 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;
 }
 
-- 
2.9.5


  parent reply	other threads:[~2019-03-01 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 10:14 [PATCH net-next v2 0/2]cxgb4/cxgb4vf: VF link state support Arjun Vynipadath
2019-03-01 10:14 ` [PATCH net-next v2 1/2] cxgb4: Add VF Link " Arjun Vynipadath
2019-03-01 10:14 ` Arjun Vynipadath [this message]
2019-03-02  7:20 ` [PATCH net-next v2 0/2]cxgb4/cxgb4vf: VF link " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190301101448.9314-3-arjun@chelsio.com \
    --to=arjun@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=dt@chelsio.com \
    --cc=indranil@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=vishal@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).