From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch 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 09/16] i40evf: make early init sequence even more robust
Date: Sat, 6 Dec 2014 05:02:06 -0800 [thread overview]
Message-ID: <1417870933-17248-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1417870933-17248-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Mitch Williams <mitch.a.williams@intel.com>
When multiple VFs attempt to initialize simultaneously, the firmware may
delay or drop messages. Make the init code more adept at handling these
situations by a) reinitializing the admin queue if the firmware fails to
process a request, and b) resending a request if the PF doesn't answer.
Once the request has been sent again, the PF might end up getting both
requests and send the configuration information to the driver twice.
This will cause the VF to complain about receiving an unexpected message
from the PF. Since this is not fatal, reduce the warning level of the
log messages that are generated in response to this event.
Change-ID: I9370a1a2fde2ad3934fa25ccfd0545edfbbb4805
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 +++++++--
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 16 +++++-----------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 8e01009..62456f8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2045,6 +2045,8 @@ static void i40evf_init_task(struct work_struct *work)
case __I40EVF_INIT_VERSION_CHECK:
if (!i40evf_asq_done(hw)) {
dev_err(&pdev->dev, "Admin queue command never completed\n");
+ i40evf_shutdown_adminq(hw);
+ adapter->state = __I40EVF_STARTUP;
goto err;
}
@@ -2078,8 +2080,11 @@ static void i40evf_init_task(struct work_struct *work)
goto err;
}
err = i40evf_get_vf_config(adapter);
- if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK)
- goto restart;
+ if (err == I40E_ERR_ADMIN_QUEUE_NO_WORK) {
+ dev_info(&pdev->dev, "Resending VF config request\n");
+ err = i40evf_send_vf_config_msg(adapter);
+ goto err;
+ }
if (err) {
dev_err(&pdev->dev, "Unable to get VF config (%d)\n",
err);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index 07c13b0..5fde5a7 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -715,15 +715,9 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
}
return;
}
- if (v_opcode != adapter->current_op) {
- dev_err(&adapter->pdev->dev, "%s: Pending op is %d, received %d\n",
- __func__, adapter->current_op, v_opcode);
- /* We're probably completely screwed at this point, but clear
- * the current op and try to carry on....
- */
- adapter->current_op = I40E_VIRTCHNL_OP_UNKNOWN;
- return;
- }
+ if (v_opcode != adapter->current_op)
+ dev_info(&adapter->pdev->dev, "Pending op is %d, received %d\n",
+ adapter->current_op, v_opcode);
if (v_retval) {
dev_err(&adapter->pdev->dev, "%s: PF returned error %d to our request %d\n",
__func__, v_retval, v_opcode);
@@ -775,8 +769,8 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
adapter->aq_pending &= ~(I40EVF_FLAG_AQ_MAP_VECTORS);
break;
default:
- dev_warn(&adapter->pdev->dev, "%s: Received unexpected message %d from PF\n",
- __func__, v_opcode);
+ dev_info(&adapter->pdev->dev, "Received unexpected message %d from PF\n",
+ v_opcode);
break;
} /* switch v_opcode */
adapter->current_op = I40E_VIRTCHNL_OP_UNKNOWN;
--
1.9.3
next prev parent reply other threads:[~2014-12-06 13:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-06 13:01 [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2014-12-06 Jeff Kirsher
2014-12-06 13:01 ` [net-next v2 01/16] i40e: Remove unneeded break statement Jeff Kirsher
2014-12-06 13:01 ` [net-next v2 02/16] i40e: remove useless debug noise Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 03/16] i40e: allow various base numbers in debugfs aq commands Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 04/16] i40e: Add description to misc and fd interrupts Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 05/16] i40e: don't enable PTP support on more than one PF per port Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 06/16] i40e: Add a virtual channel op to config RSS Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 07/16] i40e: Define and use i40e_is_vf macro Jeff Kirsher
2014-12-06 13:18 ` Joe Perches
2014-12-06 13:02 ` [net-next v2 08/16] i40e: fix netdev_stat macro definition Jeff Kirsher
2014-12-06 13:02 ` Jeff Kirsher [this message]
2014-12-06 13:02 ` [net-next v2 10/16] i40e: Increase reset delay Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 11/16] i40e: Add new update VSI flow to accommodate FW fix with VSI Loopback mode Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 12/16] i40e: Re enable Main VSI loopback setting in the reset path Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 13/16] i40e: increase ARQ size Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 14/16] i40e: get pf_id from HW rather than PCI function Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 15/16] i40e: Bump i40e version to 1.2.2 and i40evf version to 1.0.6 Jeff Kirsher
2014-12-06 13:02 ` [net-next v2 16/16] i40e: Reduce stack in i40e_dbg_dump_desc Jeff Kirsher
2014-12-09 1:50 ` [net-next v2 00/16][pull request] Intel Wired LAN Driver Updates 2014-12-06 David Miller
2014-12-09 2:05 ` 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=1417870933-17248-10-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).