summaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/rio.c
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2016-03-22 22:26:00 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 23:36:02 +0100
commit8b189fdbc5f68f3f43e67004de25f75c1a5b4e51 (patch)
treeb511383866423f5bfd0fff2257c0b4e2cd4985cf /drivers/rapidio/rio.c
parentrapidio/tsi721_dma: fix pending transaction queue handling (diff)
downloadlinux-8b189fdbc5f68f3f43e67004de25f75c1a5b4e51.tar.xz
linux-8b189fdbc5f68f3f43e67004de25f75c1a5b4e51.zip
rapidio: add query_mport operation
Add mport query operation to report master port RapidIO capabilities and run time configuration to upper level drivers. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/rio.c')
-rw-r--r--drivers/rapidio/rio.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index e220edc85c68..c72f4da8065e 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -68,6 +68,23 @@ u16 rio_local_get_device_id(struct rio_mport *port)
}
/**
+ * rio_query_mport - Query mport device attributes
+ * @port: mport device to query
+ * @mport_attr: mport attributes data structure
+ *
+ * Returns attributes of specified mport through the
+ * pointer to attributes data structure.
+ */
+int rio_query_mport(struct rio_mport *port,
+ struct rio_mport_attr *mport_attr)
+{
+ if (!port->ops->query_mport)
+ return -ENODATA;
+ return port->ops->query_mport(port, mport_attr);
+}
+EXPORT_SYMBOL(rio_query_mport);
+
+/**
* rio_add_device- Adds a RIO device to the device model
* @rdev: RIO device
*