netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Catherine Sullivan <catherine.sullivan@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 14/15] i40e: Don't exit link event early if link speed has changed
Date: Tue, 13 Jan 2015 03:33:30 -0800	[thread overview]
Message-ID: <1421148811-9763-15-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1421148811-9763-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Catherine Sullivan <catherine.sullivan@intel.com>

Previously we were only checking if the link up state had changed,
and if it hadn't exiting the link event routine early. We should
also check if speed has changed, and if it has, stay and finish
processing the link event.

Change-ID: I9c8e0991b3f0279108a7858898c3c5ce0a9856b8
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 7c14973..80430b0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5503,14 +5503,18 @@ static void i40e_link_event(struct i40e_pf *pf)
 {
 	bool new_link, old_link;
 	struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
+	u8 new_link_speed, old_link_speed;
 
 	/* set this to force the get_link_status call to refresh state */
 	pf->hw.phy.get_link_info = true;
 
 	old_link = (pf->hw.phy.link_info_old.link_info & I40E_AQ_LINK_UP);
 	new_link = i40e_get_link_status(&pf->hw);
+	old_link_speed = pf->hw.phy.link_info_old.link_speed;
+	new_link_speed = pf->hw.phy.link_info.link_speed;
 
 	if (new_link == old_link &&
+	    new_link_speed == old_link_speed &&
 	    (test_bit(__I40E_DOWN, &vsi->state) ||
 	     new_link == netif_carrier_ok(vsi->netdev)))
 		return;
-- 
1.9.3

  parent reply	other threads:[~2015-01-13 11:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 11:33 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 Jeff Kirsher
2015-01-13 11:33 ` [net-next 01/15] i40e: disable IOV before freeing resources Jeff Kirsher
2015-01-13 11:33 ` [net-next 02/15] i40evf: remove redundant code Jeff Kirsher
2015-01-13 11:33 ` [net-next 03/15] i40evf: Remove some scary log messages Jeff Kirsher
2015-01-13 14:22   ` Sergei Shtylyov
2015-01-13 11:33 ` [net-next 04/15] i40evf: refactor shutdown code Jeff Kirsher
2015-01-13 11:33 ` [net-next 05/15] i40evf: remove leftover VLAN filters Jeff Kirsher
2015-01-13 11:33 ` [net-next 06/15] i40evf: don't fire traffic IRQs when the interface is down Jeff Kirsher
2015-01-13 11:33 ` [net-next 07/15] i40evf: enable interrupt 0 appropriately Jeff Kirsher
2015-01-13 11:33 ` [net-next 08/15] i40evf: kick a stalled admin queue Jeff Kirsher
2015-01-13 11:33 ` [net-next 09/15] i40e: Add warning for NPAR partitions with link speed less than 10Gbps Jeff Kirsher
2015-01-13 11:33 ` [net-next 10/15] i40e: remove VN2VN related mac filters Jeff Kirsher
2015-01-13 11:33 ` [net-next 11/15] i40e/i40evf: find partition_id in npar mode Jeff Kirsher
2015-01-13 11:33 ` [net-next 12/15] i40e: Adding function for reading PBA String Jeff Kirsher
2015-01-13 11:33 ` [net-next 13/15] i40e: limit WoL and link settings to partition 1 Jeff Kirsher
2015-01-13 11:33 ` Jeff Kirsher [this message]
2015-01-13 11:33 ` [net-next 15/15] i40e: limit sriov to partition 1 of NPAR configurations Jeff Kirsher
2015-01-13 18:57 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 David Miller
2015-01-13 19:01   ` Jeff Kirsher

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=1421148811-9763-15-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=catherine.sullivan@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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).