Commit fd58926e authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Greg Kroah-Hartman

greybus: loopback: send command to APBridge to tag throughput

A USB vendor command has been added to APBridge to allow for tagging of
specific CPort identifiers with internal timing data, specifically geared
towards capturing and understanding latencies in the UniPro fabric. This
patch sends a command to APBridge for each known loopback CPort to tag data
as appropriate. Subsequent patches will present this data to user-space for
ongoing integration analysis.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent e7e2efc4
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <asm/div64.h> #include <asm/div64.h>
#include "greybus.h" #include "greybus.h"
#include "connection.h"
#define NSEC_PER_DAY 86400000000000ULL #define NSEC_PER_DAY 86400000000000ULL
...@@ -938,6 +939,7 @@ static int gb_loopback_connection_init(struct gb_connection *connection) ...@@ -938,6 +939,7 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
} }
gb_loopback_insert_id(gb); gb_loopback_insert_id(gb);
gb_connection_latency_tag_enable(connection);
gb_dev.count++; gb_dev.count++;
mutex_unlock(&gb_dev.mutex); mutex_unlock(&gb_dev.mutex);
return 0; return 0;
...@@ -975,6 +977,7 @@ static void gb_loopback_connection_exit(struct gb_connection *connection) ...@@ -975,6 +977,7 @@ static void gb_loopback_connection_exit(struct gb_connection *connection)
connection->private = NULL; connection->private = NULL;
kfifo_free(&gb->kfifo_lat); kfifo_free(&gb->kfifo_lat);
kfifo_free(&gb->kfifo_ts); kfifo_free(&gb->kfifo_ts);
gb_connection_latency_tag_disable(connection);
gb_dev.count--; gb_dev.count--;
if (!gb_dev.count) { if (!gb_dev.count) {
sysfs_remove_groups(kobj, loopback_dev_groups); sysfs_remove_groups(kobj, loopback_dev_groups);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment