aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-sysfs.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-11-09 22:27:53 -0500
committerBjorn Helgaas <bhelgaas@google.com>2012-11-09 23:38:53 -0500
commit6b136724691a6f247ada0c6a5f02370ed46de9f4 (patch)
treed4bbf2c49f97c98ca2b5d6cdc4f80ad5aea1e190 /drivers/pci/pci-sysfs.c
parentbff73156d3ad661655e6d9ef04c2284cf3abb0f1 (diff)
PCI: Use spec names for SR-IOV capability fields
Use the same names (almost) as the spec for TotalVFs, InitialVFs, NumVFs. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r--drivers/pci/pci-sysfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 99b5f83d2468..2f21991b8bcd 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -421,7 +421,7 @@ static ssize_t sriov_numvfs_show(struct device *dev,
421{ 421{
422 struct pci_dev *pdev = to_pci_dev(dev); 422 struct pci_dev *pdev = to_pci_dev(dev);
423 423
424 return sprintf(buf, "%u\n", pdev->sriov->nr_virtfn); 424 return sprintf(buf, "%u\n", pdev->sriov->num_VFs);
425} 425}
426 426
427/* 427/*
@@ -455,7 +455,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
455 total = pci_sriov_get_totalvfs(pdev); 455 total = pci_sriov_get_totalvfs(pdev);
456 /* Requested VFs to enable < totalvfs and none enabled already */ 456 /* Requested VFs to enable < totalvfs and none enabled already */
457 if ((num_vfs > 0) && (num_vfs <= total)) { 457 if ((num_vfs > 0) && (num_vfs <= total)) {
458 if (pdev->sriov->nr_virtfn == 0) { 458 if (pdev->sriov->num_VFs == 0) {
459 num_vfs_enabled = 459 num_vfs_enabled =
460 pdev->driver->sriov_configure(pdev, num_vfs); 460 pdev->driver->sriov_configure(pdev, num_vfs);
461 if ((num_vfs_enabled >= 0) && 461 if ((num_vfs_enabled >= 0) &&
@@ -467,7 +467,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
467 } else if (num_vfs_enabled < 0) 467 } else if (num_vfs_enabled < 0)
468 /* error code from driver callback */ 468 /* error code from driver callback */
469 return num_vfs_enabled; 469 return num_vfs_enabled;
470 } else if (num_vfs == pdev->sriov->nr_virtfn) { 470 } else if (num_vfs == pdev->sriov->num_VFs) {
471 dev_warn(&pdev->dev, 471 dev_warn(&pdev->dev,
472 "%d VFs already enabled; no enable action taken\n", 472 "%d VFs already enabled; no enable action taken\n",
473 num_vfs); 473 num_vfs);
@@ -475,14 +475,14 @@ static ssize_t sriov_numvfs_store(struct device *dev,
475 } else { 475 } else {
476 dev_warn(&pdev->dev, 476 dev_warn(&pdev->dev,
477 "%d VFs already enabled. Disable before enabling %d VFs\n", 477 "%d VFs already enabled. Disable before enabling %d VFs\n",
478 pdev->sriov->nr_virtfn, num_vfs); 478 pdev->sriov->num_VFs, num_vfs);
479 return -EINVAL; 479 return -EINVAL;
480 } 480 }
481 } 481 }
482 482
483 /* disable vfs */ 483 /* disable vfs */
484 if (num_vfs == 0) { 484 if (num_vfs == 0) {
485 if (pdev->sriov->nr_virtfn != 0) { 485 if (pdev->sriov->num_VFs != 0) {
486 ret = pdev->driver->sriov_configure(pdev, 0); 486 ret = pdev->driver->sriov_configure(pdev, 0);
487 return ret ? ret : count; 487 return ret ? ret : count;
488 } else { 488 } else {