From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel•com>,
Mitch Williams <mitch.a.williams@intel•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org, gospo@redhat•com,
sassmann@redhat•com,
Jesse Brandeburg <jesse.brandeburg@intel•com>
Subject: Re: [net-next 08/15] i40e: acknowledge VFLR when disabling SR-IOV
Date: Mon, 06 Jan 2014 20:43:24 +0400 [thread overview]
Message-ID: <52CADD2C.2090103@cogentembedded.com> (raw)
In-Reply-To: <1389011436-18424-9-git-send-email-jeffrey.t.kirsher@intel.com>
On 06.01.2014 16:30, Jeff Kirsher wrote:
> From: Mitch Williams <mitch.a.williams@intel•com>
> When SR-IOV is disabled, the (now nonexistent) virtual function
> devices undergo a VFLR event. We don't need to handle this event
> because the VFs are gone, but we do need to tell the HW that they are
> complete. This fixes an issue with a phantom VFLR and broken VFs when
> SR-IOV is re-enabled.
> Change-Id: I7580b49ded0158172a85b14661ec212af77000c8
> Signed-off-by: Mitch Williams <mitch.a.williams@intel•com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel•com>
> Tested-by: Sibai Li <sibai.li@intel•com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> index f92404c..e91f9d7 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
[...]
> @@ -748,8 +750,17 @@ void i40e_free_vfs(struct i40e_pf *pf)
> kfree(pf->vf);
> pf->vf = NULL;
>
> - if (!i40e_vfs_are_assigned(pf))
> + if (!i40e_vfs_are_assigned(pf)) {
> pci_disable_sriov(pf->pdev);
> + /* Acknowledge VFLR for all VFS. Without this, VFs will fail to
> + * work correctly when SR-IOV gets re-enabled.
> + */
> + for (vf_id = 0; vf_id < tmp; vf_id++) {
> + reg_idx = (hw->func_caps.vf_base_id + vf_id) / 32;
> + bit_idx = (hw->func_caps.vf_base_id + vf_id) % 32;
> + wr32(hw, I40E_GLGEN_VFLRSTAT(reg_idx), (1 << bit_idx));
> + }
> + }
> else
} and *else* should be on the same line. And the *else* arm should also
have {} now.
> dev_warn(&pf->pdev->dev,
> "unable to disable SR-IOV because VFs are assigned.\n");
WBR, Sergei
next prev parent reply other threads:[~2014-01-06 16:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 12:30 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-01-06 12:30 ` [net-next 01/15] i40e: Record dma buffer info for dummy packets Jeff Kirsher
2014-01-06 12:30 ` [net-next 02/15] i40e: Fix SR-IOV VF port VLAN Jeff Kirsher
2014-01-06 12:30 ` [net-next 03/15] i40e: fix whitespace Jeff Kirsher
2014-01-06 12:30 ` [net-next 04/15] i40e: avoid unnecessary register read Jeff Kirsher
2014-01-06 12:30 ` [net-next 05/15] i40e: Do not enable default port on the VEB Jeff Kirsher
2014-01-06 12:30 ` [net-next 06/15] i40e: use struct assign instead of memcpy Jeff Kirsher
2014-01-06 12:30 ` [net-next 07/15] i40e: don't allocate zero size Jeff Kirsher
2014-01-06 12:30 ` [net-next 08/15] i40e: acknowledge VFLR when disabling SR-IOV Jeff Kirsher
2014-01-06 16:43 ` Sergei Shtylyov [this message]
2014-01-06 18:10 ` Williams, Mitch A
2014-01-07 21:55 ` Sergei Shtylyov
2014-01-06 12:30 ` [net-next 09/15] i40e: support VFs on PFs other than 0 Jeff Kirsher
2014-01-06 12:30 ` [net-next 10/15] i40e: Fix VF driver MAC address configuration Jeff Kirsher
2014-01-06 12:30 ` [net-next 11/15] i40e: use correct struct for get and update vsi params Jeff Kirsher
2014-01-06 12:30 ` [net-next 12/15] i40e: Hide the Port VLAN VLAN ID Jeff Kirsher
2014-01-06 12:30 ` [net-next 13/15] i40e: Admin queue shutdown fixes Jeff Kirsher
2014-01-06 12:30 ` [net-next 14/15] i40e: check asq alive before notify Jeff Kirsher
2014-01-06 12:30 ` [net-next 15/15] i40e: Do not allow AQ calls from ndo-ops Jeff Kirsher
2014-01-06 18:26 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates David Miller
2014-01-06 18:49 ` Jeff Kirsher
2014-01-06 20:14 ` 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=52CADD2C.2090103@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=gospo@redhat$(echo .)com \
--cc=jeffrey.t.kirsher@intel$(echo .)com \
--cc=jesse.brandeburg@intel$(echo .)com \
--cc=mitch.a.williams@intel$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sassmann@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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