On Wed, 2013-12-25 at 00:07 +0800, Ethan Zhao wrote:
> commit 43dc4e01 Limit number of reported VFs to device specific value
> It doesn't work and always returns -EBUSY because VFs ware 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().
> 
> Signed-off-by: Ethan Zhao <ethan.ker...@gmail.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks Ethan, I have added this patch as well to my queue.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to