netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ethan zhao <ethan.zhao@oracle.com>
To: Aaron Brown <aaron.f.brown@intel.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com,
	sassmann@redhat.com, ethan.kernel@gmail.com
Subject: Re: [Patch 2/2 net-next v6] ixgbe: set driver_max_VFs should be done before enabling SRIOV
Date: Fri, 17 Jan 2014 14:51:58 +0800	[thread overview]
Message-ID: <52D8D30E.7090101@oracle.com> (raw)
In-Reply-To: <1389930065-3330-3-git-send-email-aaron.f.brown@intel.com>

Great job. Thanks a lot.

Ethan

On 2014/1/17 11:41, Aaron Brown wrote:
> From: "ethan.zhao" <ethan.zhao@oracle.com>
>
> commit 43dc4e01 Limit number of reported VFs to device
>   specific value It doesn't work and always returns -EBUSY because VFs are
>   already enabled.
>
> ixgbe_enable_sriov()
>          pci_enable_sriov()
>                  sriov_enable()
>                  {
>                  ... ..
>                  iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE;
>                  pci_cfg_access_lock(dev);
>                  ... ...
>                  }
>
> pci_sriov_set_totalvfs()
> {
> ... ...
> if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
>                  return -EBUSY;
> ...
> }
>
> So should set driver_max_VFs with pci_sriov_set_totalvfs() before
> enable VFs with ixgbe_enable_sriov().
>
> V2: revised for net-next tree.
>
> Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 3fd4d3f..61d985c 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -8019,8 +8019,8 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>   	/* Mailbox */
>   	ixgbe_init_mbx_params_pf(hw);
>   	memcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops));
> -	ixgbe_enable_sriov(adapter);
>   	pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);
> +	ixgbe_enable_sriov(adapter);
>   skip_sriov:
>   
>   #endif

  reply	other threads:[~2014-01-17  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17  3:41 [Patch v6 net-next 0/2] Intel Wired LAN Driver Updates Aaron Brown
2014-01-17  3:41 ` [PATCH v6 net-next 1/2] ixgbe: define IXGBE_MAX_VFS_DRV_LIMIT macro and cleanup const 63 Aaron Brown
2014-01-17  3:41 ` [Patch 2/2 net-next v6] ixgbe: set driver_max_VFs should be done before enabling SRIOV Aaron Brown
2014-01-17  6:51   ` ethan zhao [this message]
2014-01-18  2:38 ` [Patch v6 net-next 0/2] Intel Wired LAN Driver Updates 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=52D8D30E.7090101@oracle.com \
    --to=ethan.zhao@oracle.com \
    --cc=aaron.f.brown@intel.com \
    --cc=davem@davemloft.net \
    --cc=ethan.kernel@gmail.com \
    --cc=gospo@redhat.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 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).