netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch A Williams <mitch.a.williams@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 v2 08/15] i40evf: kick a stalled admin queue
Date: Tue, 13 Jan 2015 11:58:06 -0800	[thread overview]
Message-ID: <1421179093-10932-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1421179093-10932-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mitch A Williams <mitch.a.williams@intel.com>

On some versions of the firmware, the VF admin send queue may become
stalled. In this case, the easiest solution is to just place another
descriptor on the queue; the firmware will then process both requests.

The early init code already accounts for this, but the runtime code does
not. In the watchdog task, check for the stall condition, and if it's
found, send our API version to the PF. When the PF replies, just ignore
the reply.

Change-ID: I380d78185a4f284d649c44d263e648afc9b4d50c
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c     | 7 ++++++-
 drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index e2311af..21ccbe8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1336,8 +1336,13 @@ static void i40evf_watchdog_task(struct work_struct *work)
 	/* Process admin queue tasks. After init, everything gets done
 	 * here so we don't race on the admin queue.
 	 */
-	if (adapter->aq_pending)
+	if (adapter->aq_pending) {
+		if (!i40evf_asq_done(hw)) {
+			dev_dbg(&adapter->pdev->dev, "Admin queue timeout\n");
+			i40evf_send_api_ver(adapter);
+		}
 		goto watchdog_done;
+	}
 
 	if (adapter->aq_required & I40EVF_FLAG_AQ_MAP_VECTORS) {
 		i40evf_map_queues(adapter);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index 3aeb633..3f0c85e 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -720,6 +720,9 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
 			__func__, v_retval, v_opcode);
 	}
 	switch (v_opcode) {
+	case I40E_VIRTCHNL_OP_VERSION:
+		/* no action, but also not an error */
+		break;
 	case I40E_VIRTCHNL_OP_GET_STATS: {
 		struct i40e_eth_stats *stats =
 			(struct i40e_eth_stats *)msg;
-- 
1.9.3

  parent reply	other threads:[~2015-01-13 19:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 19:57 [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 Jeff Kirsher
2015-01-13 19:57 ` [net-next v2 01/15] i40e: disable IOV before freeing resources Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 02/15] i40evf: remove redundant code Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 03/15] i40evf: Remove some scary log messages Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 04/15] i40evf: refactor shutdown code Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 05/15] i40evf: remove leftover VLAN filters Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 06/15] i40evf: don't fire traffic IRQs when the interface is down Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 07/15] i40evf: enable interrupt 0 appropriately Jeff Kirsher
2015-01-13 19:58 ` Jeff Kirsher [this message]
2015-01-13 19:58 ` [net-next v2 09/15] i40e: Add warning for NPAR partitions with link speed less than 10Gbps Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 10/15] i40e: remove VN2VN related mac filters Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 11/15] i40e/i40evf: find partition_id in npar mode Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 12/15] i40e: Adding function for reading PBA String Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 13/15] i40e: limit WoL and link settings to partition 1 Jeff Kirsher
2015-01-18  6:10   ` Yuval Mintz
2015-01-18 23:26     ` Nelson, Shannon
2015-01-19  6:09       ` Yuval Mintz
2015-01-13 19:58 ` [net-next v2 14/15] i40e: Don't exit link event early if link speed has changed Jeff Kirsher
2015-01-13 19:58 ` [net-next v2 15/15] i40e: limit sriov to partition 1 of NPAR configurations Jeff Kirsher
2015-01-13 21:06 ` [net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 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=1421179093-10932-9-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.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).