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

greybus: es-drivers: add outbound timestamp to connection

In order to facilitate grabbing a timestamp that doesn't include greybus
overhead, this patch adds a timestamp right before usb_submit_urb() for
both es1.c and es2.c. Long term the timestmaping of messages like this
probably wants to go away but, for the moment it may have some use to the
firmware people instrumenting the performance of the system.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent a1a4a29c
......@@ -16,6 +16,7 @@
#include "greybus.h"
#include "svc_msg.h"
#include "kernel_ver.h"
#include "connection.h"
/* Memory sizes for the buffers sent to/from the ES1 controller */
#define ES1_SVC_MSG_SIZE (sizeof(struct svc_msg) + SZ_64K)
......@@ -244,6 +245,7 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
usb_sndbulkpipe(udev, es1->cport_out_endpoint),
message->buffer, buffer_size,
cport_out_callback, message);
gb_connection_push_timestamp(message->operation->connection);
retval = usb_submit_urb(urb, gfp_mask);
if (retval) {
pr_err("error %d submitting URB\n", retval);
......
......@@ -16,6 +16,7 @@
#include "greybus.h"
#include "svc_msg.h"
#include "kernel_ver.h"
#include "connection.h"
/* Memory sizes for the buffers sent to/from the ES1 controller */
#define ES1_SVC_MSG_SIZE (sizeof(struct svc_msg) + SZ_64K)
......@@ -340,6 +341,7 @@ static int message_send(struct greybus_host_device *hd, u16 cport_id,
es1->cport_out[bulk_ep_set].endpoint),
message->buffer, buffer_size,
cport_out_callback, message);
gb_connection_push_timestamp(message->operation->connection);
retval = usb_submit_urb(urb, gfp_mask);
if (retval) {
pr_err("error %d submitting URB\n", retval);
......
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