From: Phil Sutter <phil@nwl.cc>
To: David Miller <davem@davemloft.net>, Bjorn Helgaas <bhelgaas@google.com>
Cc: netdev@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [net-next PATCH 1/3] device: bus_type: Introduce num_vf callback
Date: Wed, 18 Jan 2017 14:04:37 +0100 [thread overview]
Message-ID: <20170118130439.15023-2-phil@nwl.cc> (raw)
In-Reply-To: <20170118130439.15023-1-phil@nwl.cc>
This allows for bus types to implement their own method of retrieving
the number of virtual functions a NIC on that type of bus supports.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
include/linux/device.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/device.h b/include/linux/device.h
index 491b4c0ca6333..6d73b70a4a5d7 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -88,6 +88,8 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
*
* @suspend: Called when a device on this bus wants to go to sleep mode.
* @resume: Called to bring a device on this bus out of sleep mode.
+ * @num_vf: Called to find out how many virtual functions a device on this
+ * bus supports.
* @pm: Power management operations of this bus, callback the specific
* device driver's pm-ops.
* @iommu_ops: IOMMU specific operations for this bus, used to attach IOMMU
@@ -127,6 +129,8 @@ struct bus_type {
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
+ int (*num_vf)(struct device *dev);
+
const struct dev_pm_ops *pm;
const struct iommu_ops *iommu_ops;
--
2.11.0
next prev parent reply other threads:[~2017-01-18 13:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 13:04 [net-next PATCH 0/3] Retrieve number of VFs in a bus-agnostic way Phil Sutter
2017-01-18 13:04 ` Phil Sutter [this message]
2017-01-18 13:04 ` [net-next PATCH 2/3] PCI: implement num_vf bus type callback Phil Sutter
2017-01-18 13:04 ` [net-next PATCH 3/3] device: Implement a bus agnostic dev_num_vf routine Phil Sutter
2017-01-20 16:43 ` [net-next PATCH 0/3] Retrieve number of VFs in a bus-agnostic way David Miller
2017-01-20 16:59 ` Phil Sutter
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=20170118130439.15023-2-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).