From: Bryan O'Donoghue Date: Tue, 11 Aug 2015 12:50:52 +0000 (+0100) Subject: greybus: es-drivers: add outbound timestamp to connection X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1282^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f2a809e8b4c69f61de17c3efe144b9dba23924b;p=karo-tx-linux.git 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: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es1.c b/drivers/staging/greybus/es1.c index 0cb7a3c7ef72..7fe1eaa17024 100644 --- a/drivers/staging/greybus/es1.c +++ b/drivers/staging/greybus/es1.c @@ -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); diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index 323721a2e2aa..43cbc4d06e5f 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -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);