diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-06-22 11:42:04 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-24 16:22:30 -0700 |
commit | 3094f9477301ec477fed2a43fef68c43e70e72ce (patch) | |
tree | 8685def4a089d94d85a98d972a23503ae1963695 /drivers/staging/greybus/connection.c | |
parent | 1ba30c33096ced9d5c5814acdc46f53f3864f4e6 (diff) | |
download | op-kernel-dev-3094f9477301ec477fed2a43fef68c43e70e72ce.zip op-kernel-dev-3094f9477301ec477fed2a43fef68c43e70e72ce.tar.gz |
greybus: connection: add support for high-priority connections
Add connection flag to indicate that a connection has high priority.
For the SVC and control connections this may be used by the host-device
driver as a hint to allocate dedicated DMA channels or to use polling to
avoid message congestion.
We also allow drivers to set this flag on their connections, even though
we currently have no use case for this (and the host-device driver is
again free to ignore it).
Note that this mechanism can be used to indicate also high-bandwidth
connections (e.g. wanting larger buffers or dedicated endpoints), but
that that should be done using a separate high-bandwidth flag rather
than overloading the high-priority flag.
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 7b2d635..9eb177e 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -232,14 +232,15 @@ gb_connection_create_static(struct gb_host_device *hd, u16 hd_cport_id, gb_request_handler_t handler) { return _gb_connection_create(hd, hd_cport_id, NULL, NULL, 0, handler, - 0); + GB_CONNECTION_FLAG_HIGH_PRIO); } struct gb_connection * gb_connection_create_control(struct gb_interface *intf) { return _gb_connection_create(intf->hd, -1, intf, NULL, 0, NULL, - GB_CONNECTION_FLAG_CONTROL); + GB_CONNECTION_FLAG_CONTROL | + GB_CONNECTION_FLAG_HIGH_PRIO); } struct gb_connection * |