All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
	oss-drivers@netronome.com, Don Dutile <ddutile@redhat.com>
Subject: Re: [PATCH] nfp: align setting totalvfs to changes in PCI core
Date: Fri, 29 Jun 2018 15:09:50 -0500	[thread overview]
Message-ID: <20180629200949.GC40928@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20180628183009.24837-1-jakub.kicinski@netronome.com>

On Thu, Jun 28, 2018 at 11:30:09AM -0700, Jakub Kicinski wrote:
> Since commit 8d85a7a4f2c9 ("PCI/IOV: Allow PF drivers to limit total_VFs
> to 0") the meaning of pci_sriov_set_totalvfs(pdev, 0) changed from
> 'no limit set/can use total_VFs' to 'limit set to 0/can't use any VFs'.
> The driver was resetting the limit in case different FW or driver has
> set it to an incorrect value.  Now the PCI core will take care of
> resetting so we don't have to do that.
> 
> Fixes: 8d85a7a4f2c9 ("PCI/IOV: Allow PF drivers to limit total_VFs to 0")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Applied to for-linus for v4.18,thanks!

> ---
>  drivers/net/ethernet/netronome/nfp/nfp_main.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
> index 46b76d5a726c..152283d7e59c 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c
> @@ -240,7 +240,6 @@ static int nfp_pcie_sriov_read_nfd_limit(struct nfp_pf *pf)
>  		return pci_sriov_set_totalvfs(pf->pdev, pf->limit_vfs);
>  
>  	pf->limit_vfs = ~0;
> -	pci_sriov_set_totalvfs(pf->pdev, 0); /* 0 is unset */
>  	/* Allow any setting for backwards compatibility if symbol not found */
>  	if (err == -ENOENT)
>  		return 0;
> @@ -668,7 +667,7 @@ static int nfp_pci_probe(struct pci_dev *pdev,
>  
>  	err = nfp_net_pci_probe(pf);
>  	if (err)
> -		goto err_sriov_unlimit;
> +		goto err_fw_unload;
>  
>  	err = nfp_hwmon_register(pf);
>  	if (err) {
> @@ -680,8 +679,6 @@ static int nfp_pci_probe(struct pci_dev *pdev,
>  
>  err_net_remove:
>  	nfp_net_pci_remove(pf);
> -err_sriov_unlimit:
> -	pci_sriov_set_totalvfs(pf->pdev, 0);
>  err_fw_unload:
>  	kfree(pf->rtbl);
>  	nfp_mip_close(pf->mip);
> @@ -715,7 +712,6 @@ static void nfp_pci_remove(struct pci_dev *pdev)
>  	nfp_hwmon_unregister(pf);
>  
>  	nfp_pcie_sriov_disable(pdev);
> -	pci_sriov_set_totalvfs(pf->pdev, 0);
>  
>  	nfp_net_pci_remove(pf);
>  
> -- 
> 2.17.1
> 

  reply	other threads:[~2018-06-29 20:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 22:01 [PATCH] PCI: reset driver SR-IOV state after remove Jakub Kicinski
2018-06-26 16:40 ` Jakub Kicinski
2018-06-28 13:56   ` Bjorn Helgaas
2018-06-28 16:17     ` Jakub Kicinski
2018-06-28 18:07       ` Bjorn Helgaas
2018-06-28 18:14         ` Jakub Kicinski
2018-06-28 22:10           ` Bjorn Helgaas
2018-06-28 22:26             ` Jakub Kicinski
2018-06-28 18:30         ` [PATCH] nfp: align setting totalvfs to changes in PCI core Jakub Kicinski
2018-06-29 20:09           ` Bjorn Helgaas [this message]
2018-06-29 20:09 ` [PATCH] PCI: reset driver SR-IOV state after remove Bjorn Helgaas
2018-06-29 20:20   ` Jakub Kicinski

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=20180629200949.GC40928@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=ddutile@redhat.com \
    --cc=hch@infradead.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=oss-drivers@netronome.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.