From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Stephane Grosjean <s.grosjean@peak-system.com>,
"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH] peak_usb: fix hwtstamp assignment
Date: Thu, 22 Nov 2012 11:35:58 +0100 [thread overview]
Message-ID: <50AE000E.4040208@pengutronix.de> (raw)
In-Reply-To: <50AD4B1F.4070806@hartkopp.net>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
On 11/21/2012 10:43 PM, Oliver Hartkopp wrote:
> The skb->tstamp is set to the hardware timestamp when available in the USB
> urb message. This leads to user visible timestamps which contain the 'uptime'
> of the USB adapter - and not the usual system generated timestamp.
>
> Fix this wrong assignment by applying the available hardware timestamp to the
> skb_shared_hwtstamps data structure - which is intended for this purpose.
>
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
>
> ---
>
> Hello Marc, hello Stephane,
>
> i think we would generally need to support a hwtstamp_ioctl() for CAN
> interfaces which are controlled with a struct hwtstamp_config in the future.
>
> For now this patch fixes the current issue much better than a simple removal
> of the skb->tstamp assignment.
Sure, making it work correctly is better than removing the broken stuff.
But removing the broken code is better than having wrong code in the driver.
> I'm currently on a business trip and i accidentally missed to take two PEAK
> USB interfaces with me to test this patch. It's compile tested ...
:)
> So let's wait for an Acked-by from Stephane.
yep,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]
prev parent reply other threads:[~2012-11-22 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 21:43 [PATCH] peak_usb: fix hwtstamp assignment Oliver Hartkopp
2012-11-22 10:35 ` Marc Kleine-Budde [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AE000E.4040208@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=s.grosjean@peak-system.com \
--cc=socketcan@hartkopp.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).