summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-sysfs.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-11-10 04:27:53 +0100
committerBjorn Helgaas <bhelgaas@google.com>2012-11-10 05:38:53 +0100
commit6b136724691a6f247ada0c6a5f02370ed46de9f4 (patch)
treed4bbf2c49f97c98ca2b5d6cdc4f80ad5aea1e190 /drivers/pci/pci-sysfs.c
parentPCI: Provide method to reduce the number of total VFs supported (diff)
downloadlinux-6b136724691a6f247ada0c6a5f02370ed46de9f4.tar.xz
linux-6b136724691a6f247ada0c6a5f02370ed46de9f4.zip
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,
{
struct pci_dev *pdev = to_pci_dev(dev);
- return sprintf(buf, "%u\n", pdev->sriov->nr_virtfn);
+ return sprintf(buf, "%u\n", pdev->sriov->num_VFs);
}
/*
@@ -455,7 +455,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
total = pci_sriov_get_totalvfs(pdev);
/* Requested VFs to enable < totalvfs and none enabled already */
if ((num_vfs > 0) && (num_vfs <= total)) {
- if (pdev->sriov->nr_virtfn == 0) {
+ if (pdev->sriov->num_VFs == 0) {
num_vfs_enabled =
pdev->driver->sriov_configure(pdev, num_vfs);
if ((num_vfs_enabled >= 0) &&
@@ -467,7 +467,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
} else if (num_vfs_enabled < 0)
/* error code from driver callback */
return num_vfs_enabled;
- } else if (num_vfs == pdev->sriov->nr_virtfn) {
+ } else if (num_vfs == pdev->sriov->num_VFs) {
dev_warn(&pdev->dev,
"%d VFs already enabled; no enable action taken\n",
num_vfs);
@@ -475,14 +475,14 @@ static ssize_t sriov_numvfs_store(struct device *dev,
} else {
dev_warn(&pdev->dev,
"%d VFs already enabled. Disable before enabling %d VFs\n",
- pdev->sriov->nr_virtfn, num_vfs);
+ pdev->sriov->num_VFs, num_vfs);
return -EINVAL;
}
}
/* disable vfs */
if (num_vfs == 0) {
- if (pdev->sriov->nr_virtfn != 0) {
+ if (pdev->sriov->num_VFs != 0) {
ret = pdev->driver->sriov_configure(pdev, 0);
return ret ? ret : count;
} else {