All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Williams, Mitch A" <mitch.a.williams@intel.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
	"Rose, Gregory V" <gregory.v.rose@intel.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"gospo@redhat.com" <gospo@redhat.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Subject: Re: [net-next 08/15] i40e: acknowledge VFLR when disabling SR-IOV
Date: Wed, 08 Jan 2014 01:55:40 +0400	[thread overview]
Message-ID: <52CC77DC.5020801@cogentembedded.com> (raw)
In-Reply-To: <AAEA33E297BCAC4B9BB20A7C2DF0AB8D654EA3EF@FMSMSX113.amr.corp.intel.com>

Hello.

On 06-01-2014 22:10, Williams, Mitch A 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

> You are absolutely correct, Sergei, and I apologize for not seeing this before I submitted the patch.

    I guess you haven't run scripts/checkpatch.pl, have you?

> There will be a patch coming from Greg Rose in the next few weeks that will fix this problem in the process of adding a bug fix. Since this is just cosmetic, would it be all right with you if we just wait for Greg's patch to come through?

    Looks like DaveM has decided for everybody and the patch with the fix has 
been already posted too.

> -Mitch

WBR, Sergei

  reply	other threads:[~2014-01-07 21:55 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
2014-01-06 18:10     ` Williams, Mitch A
2014-01-07 21:55       ` Sergei Shtylyov [this message]
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=52CC77DC.5020801@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=gregory.v.rose@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.