<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/ptp, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-11-15T20:48:32Z</updated>
<entry>
<title>ptp: Introduce strict checking of external time stamp options.</title>
<updated>2019-11-15T20:48:32Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2019-11-14T18:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6138e687c7b679da08c0feb55a88f448f7890c07'/>
<id>urn:sha1:6138e687c7b679da08c0feb55a88f448f7890c07</id>
<content type='text'>
User space may request time stamps on rising edges, falling edges, or
both.  However, the particular mode may or may not be supported in the
hardware or in the driver.  This patch adds a "strict" flag that tells
drivers to ensure that the requested mode will be honored.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: Validate requests to enable time stamping of external signals.</title>
<updated>2019-11-15T20:48:32Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2019-11-14T18:44:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd734d54e67990eebfc3106dc39047c1141d4197'/>
<id>urn:sha1:cd734d54e67990eebfc3106dc39047c1141d4197</id>
<content type='text'>
Commit 415606588c61 ("PTP: introduce new versions of IOCTLs")
introduced a new external time stamp ioctl that validates the flags.
This patch extends the validation to ensure that at least one rising
or falling edge flag is set when enabling external time stamps.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: fix typo of "mechanism" in Kconfig help text</title>
<updated>2019-10-07T18:55:46Z</updated>
<author>
<name>Antonio Borneo</name>
<email>antonio.borneo@st.com</email>
</author>
<published>2019-10-07T15:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=503c9addef613c872679e24fc8a78f3febeb5a08'/>
<id>urn:sha1:503c9addef613c872679e24fc8a78f3febeb5a08</id>
<content type='text'>
Fix typo s/mechansim/mechanism/

Signed-off-by: Antonio Borneo &lt;antonio.borneo@st.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp_qoriq: Initialize the registers' spinlock before calling ptp_qoriq_settime</title>
<updated>2019-10-02T16:20:38Z</updated>
<author>
<name>Vladimir Oltean</name>
<email>olteanv@gmail.com</email>
</author>
<published>2019-10-01T19:07:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db34a4714c013b644eec2de0ec81b1f0373b8b93'/>
<id>urn:sha1:db34a4714c013b644eec2de0ec81b1f0373b8b93</id>
<content type='text'>
Because ptp_qoriq_settime is being called prior to spin_lock_init, the
following stack trace can be seen at driver probe time:

[    2.269117] the code is fine but needs lockdep annotation.
[    2.274569] turning off the locking correctness validator.
[    2.280027] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc7-01478-g01eaa67a4797 #263
[    2.288073] Hardware name: Freescale LS1021A
[    2.292337] [&lt;c0313cb4&gt;] (unwind_backtrace) from [&lt;c030e11c&gt;] (show_stack+0x10/0x14)
[    2.300045] [&lt;c030e11c&gt;] (show_stack) from [&lt;c1219440&gt;] (dump_stack+0xcc/0xf8)
[    2.307235] [&lt;c1219440&gt;] (dump_stack) from [&lt;c03b9b44&gt;] (register_lock_class+0x730/0x73c)
[    2.315372] [&lt;c03b9b44&gt;] (register_lock_class) from [&lt;c03b6190&gt;] (__lock_acquire+0x78/0x270c)
[    2.323856] [&lt;c03b6190&gt;] (__lock_acquire) from [&lt;c03b90cc&gt;] (lock_acquire+0xe0/0x22c)
[    2.331649] [&lt;c03b90cc&gt;] (lock_acquire) from [&lt;c123c310&gt;] (_raw_spin_lock_irqsave+0x54/0x68)
[    2.340048] [&lt;c123c310&gt;] (_raw_spin_lock_irqsave) from [&lt;c0e73fe4&gt;] (ptp_qoriq_settime+0x38/0x80)
[    2.348878] [&lt;c0e73fe4&gt;] (ptp_qoriq_settime) from [&lt;c0e746d4&gt;] (ptp_qoriq_init+0x1f8/0x484)
[    2.357189] [&lt;c0e746d4&gt;] (ptp_qoriq_init) from [&lt;c0e74aac&gt;] (ptp_qoriq_probe+0xd0/0x184)
[    2.365243] [&lt;c0e74aac&gt;] (ptp_qoriq_probe) from [&lt;c0b0a07c&gt;] (platform_drv_probe+0x48/0x9c)
[    2.373555] [&lt;c0b0a07c&gt;] (platform_drv_probe) from [&lt;c0b07a14&gt;] (really_probe+0x1c4/0x400)
[    2.381779] [&lt;c0b07a14&gt;] (really_probe) from [&lt;c0b07e28&gt;] (driver_probe_device+0x78/0x1b8)
[    2.390003] [&lt;c0b07e28&gt;] (driver_probe_device) from [&lt;c0b081d0&gt;] (device_driver_attach+0x58/0x60)
[    2.398832] [&lt;c0b081d0&gt;] (device_driver_attach) from [&lt;c0b082d4&gt;] (__driver_attach+0xfc/0x160)
[    2.407402] [&lt;c0b082d4&gt;] (__driver_attach) from [&lt;c0b05a84&gt;] (bus_for_each_dev+0x68/0xb4)
[    2.415539] [&lt;c0b05a84&gt;] (bus_for_each_dev) from [&lt;c0b06b68&gt;] (bus_add_driver+0x104/0x20c)
[    2.423763] [&lt;c0b06b68&gt;] (bus_add_driver) from [&lt;c0b0909c&gt;] (driver_register+0x78/0x10c)
[    2.431815] [&lt;c0b0909c&gt;] (driver_register) from [&lt;c030313c&gt;] (do_one_initcall+0x8c/0x3ac)
[    2.439954] [&lt;c030313c&gt;] (do_one_initcall) from [&lt;c1f013f4&gt;] (kernel_init_freeable+0x468/0x548)
[    2.448610] [&lt;c1f013f4&gt;] (kernel_init_freeable) from [&lt;c12344d8&gt;] (kernel_init+0x8/0x10c)
[    2.456745] [&lt;c12344d8&gt;] (kernel_init) from [&lt;c03010b4&gt;] (ret_from_fork+0x14/0x20)
[    2.464273] Exception stack(0xea89ffb0 to 0xea89fff8)
[    2.469297] ffa0:                                     00000000 00000000 00000000 00000000
[    2.477432] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    2.485566] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000

Fixes: ff54571a747b ("ptp_qoriq: convert to use ptp_qoriq_init/free")
Signed-off-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: correctly disable flags on old ioctls</title>
<updated>2019-09-27T18:25:32Z</updated>
<author>
<name>Jacob Keller</name>
<email>jacob.e.keller@intel.com</email>
</author>
<published>2019-09-26T02:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2df4de1681767df900e15e34195bbf7dc1b23e06'/>
<id>urn:sha1:2df4de1681767df900e15e34195bbf7dc1b23e06</id>
<content type='text'>
Commit 415606588c61 ("PTP: introduce new versions of IOCTLs",
2019-09-13) introduced new versions of the PTP ioctls which actually
validate that the flags are acceptable values.

As part of this, it cleared the flags value using a bitwise
and+negation, in an attempt to prevent the old ioctl from accidentally
enabling new features.

This is incorrect for a couple of reasons. First, it results in
accidentally preventing previously working flags on the request ioctl.
By clearing the "valid" flags, we now no longer allow setting the
enable, rising edge, or falling edge flags.

Second, if we add new additional flags in the future, they must not be
set by the old ioctl. (Since the flag wasn't checked before, we could
potentially break userspace programs which sent garbage flag data.

The correct way to resolve this is to check for and clear all but the
originally valid flags.

Create defines indicating which flags are correctly checked and
interpreted by the original ioctls. Use these to clear any bits which
will not be correctly interpreted by the original ioctls.

In the future, new flags must be added to the VALID_FLAGS macros, but
*not* to the V1_VALID_FLAGS macros. In this way, new features may be
exposed over the v2 ioctls, but without breaking previous userspace
which happened to not clear the flags value properly. The old ioctl will
continue to behave the same way, while the new ioctl gains the benefit
of using the flags fields.

Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Christopher Hall &lt;christopher.s.hall@intel.com&gt;
Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>PTP: introduce new versions of IOCTLs</title>
<updated>2019-09-13T13:57:02Z</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2019-09-11T06:16:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=415606588c61230b7b4f0118fc2d64a0c1c4d102'/>
<id>urn:sha1:415606588c61230b7b4f0118fc2d64a0c1c4d102</id>
<content type='text'>
The current version of the IOCTL have a small problem which prevents us
from extending the API by making use of reserved fields. In these new
IOCTLs, we are now making sure that flags and rsv fields are zero which
will allow us to extend the API in the future.

Reviewed-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_dte: remove redundant dev_err message</title>
<updated>2019-07-25T18:37:40Z</updated>
<author>
<name>Ding Xiang</name>
<email>dingxiang@cmss.chinamobile.com</email>
</author>
<published>2019-07-23T08:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37f7c66f4560b154cfa7a8d8f1902e222e38adba'/>
<id>urn:sha1:37f7c66f4560b154cfa7a8d8f1902e222e38adba</id>
<content type='text'>
devm_ioremap_resource already contains error message, so remove
the redundant dev_err message

Signed-off-by: Ding Xiang &lt;dingxiang@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: add QorIQ PTP support for DPAA2</title>
<updated>2019-06-15T20:43:06Z</updated>
<author>
<name>Yangbo Lu</name>
<email>yangbo.lu@nxp.com</email>
</author>
<published>2019-06-14T10:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8099d7ca6e7b76282fef7565877f5c8f02f8ef4f'/>
<id>urn:sha1:8099d7ca6e7b76282fef7565877f5c8f02f8ef4f</id>
<content type='text'>
This patch is to add QorIQ PTP support for DPAA2.
Although dpaa2-ptp.c driver is a fsl_mc_driver which
is using MC APIs for register accessing, it's same
IP block with eTSEC/DPAA/ENETC 1588 timer. We will
convert to reuse ptp_qoriq driver by using register
ioremap and dropping related MC APIs.
Also allow to compile ptp_qoriq with COMPILE_TEST.

Signed-off-by: Yangbo Lu &lt;yangbo.lu@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clock: Publish scaled_ppm_to_ppb</title>
<updated>2019-06-14T05:34:55Z</updated>
<author>
<name>Shalom Toledo</name>
<email>shalomt@mellanox.com</email>
</author>
<published>2019-06-11T15:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4368dada5b37e74a13b892ca5cef8a7d558e9a5f'/>
<id>urn:sha1:4368dada5b37e74a13b892ca5cef8a7d558e9a5f</id>
<content type='text'>
Publish scaled_ppm_to_ppb to allow drivers to use it.

Signed-off-by: Shalom Toledo &lt;shalomt@mellanox.com&gt;
Reviewed-by: Petr Machata &lt;petrm@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167</title>
<updated>2019-05-30T18:26:39Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=873e65bc09078e56eaa51af2c9c60da2fad6fdbf'/>
<id>urn:sha1:873e65bc09078e56eaa51af2c9c60da2fad6fdbf</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 59 temple place suite 330 boston ma 02111
  1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 83 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070034.021731668@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
