|
@@ -3385,32 +3385,6 @@ err_disable_device:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-/*****************************************************************************/
|
|
|
-static int ena_sriov_configure(struct pci_dev *dev, int numvfs)
|
|
|
-{
|
|
|
- int rc;
|
|
|
-
|
|
|
- if (numvfs > 0) {
|
|
|
- rc = pci_enable_sriov(dev, numvfs);
|
|
|
- if (rc != 0) {
|
|
|
- dev_err(&dev->dev,
|
|
|
- "pci_enable_sriov failed to enable: %d vfs with the error: %d\n",
|
|
|
- numvfs, rc);
|
|
|
- return rc;
|
|
|
- }
|
|
|
-
|
|
|
- return numvfs;
|
|
|
- }
|
|
|
-
|
|
|
- if (numvfs == 0) {
|
|
|
- pci_disable_sriov(dev);
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- return -EINVAL;
|
|
|
-}
|
|
|
-
|
|
|
-/*****************************************************************************/
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
/* ena_remove - Device Removal Routine
|
|
@@ -3526,7 +3500,7 @@ static struct pci_driver ena_pci_driver = {
|
|
|
.suspend = ena_suspend,
|
|
|
.resume = ena_resume,
|
|
|
#endif
|
|
|
- .sriov_configure = ena_sriov_configure,
|
|
|
+ .sriov_configure = pci_sriov_configure_simple,
|
|
|
};
|
|
|
|
|
|
static int __init ena_init(void)
|