<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/ptp, branch v5.0</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.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-01-08T21:22:56Z</updated>
<entry>
<title>ptp: check that rsv field is zero in struct ptp_sys_offset_extended</title>
<updated>2019-01-08T21:22:56Z</updated>
<author>
<name>Eugene Syromiatnikov</name>
<email>esyr@redhat.com</email>
</author>
<published>2019-01-07T15:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=895ac1376d5abcb94ca1b70a595579f253237790'/>
<id>urn:sha1:895ac1376d5abcb94ca1b70a595579f253237790</id>
<content type='text'>
Otherwise it is impossible to use it for something else, as it will break
userspace that puts garbage there.

The same check should be done in other structures, but the fact that
data in reserved fields is ignored is already part of the kernel ABI.

Signed-off-by: Eugene Syromiatnikov &lt;esyr@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2018-12-29T04:54:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-12-29T04:54:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=457fa3469a65a524be04412f5cd497fa3b11c9fd'/>
<id>urn:sha1:457fa3469a65a524be04412f5cd497fa3b11c9fd</id>
<content type='text'>
Pull char/misc driver updates from Greg KH:
 "Here is the big set of char and misc driver patches for 4.21-rc1.

  Lots of different types of driver things in here, as this tree seems
  to be the "collection of various driver subsystems not big enough to
  have their own git tree" lately.

  Anyway, some highlights of the changes in here:

   - binderfs: is it a rule that all driver subsystems will eventually
     grow to have their own filesystem? Binder now has one to handle the
     use of it in containerized systems.

     This was discussed at the Plumbers conference a few months ago and
     knocked into mergable shape very fast by Christian Brauner. Who
     also has signed up to be another binder maintainer, showing a
     distinct lack of good judgement :)

   - binder updates and fixes

   - mei driver updates

   - fpga driver updates and additions

   - thunderbolt driver updates

   - soundwire driver updates

   - extcon driver updates

   - nvmem driver updates

   - hyper-v driver updates

   - coresight driver updates

   - pvpanic driver additions and reworking for more device support

   - lp driver updates. Yes really, it's _finally_ moved to the proper
     parallal port driver model, something I never thought I would see
     happen. Good stuff.

   - other tiny driver updates and fixes.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (116 commits)
  MAINTAINERS: add another Android binder maintainer
  intel_th: msu: Fix an off-by-one in attribute store
  stm class: Add a reference to the SyS-T document
  stm class: Fix a module refcount leak in policy creation error path
  char: lp: use new parport device model
  char: lp: properly count the lp devices
  char: lp: use first unused lp number while registering
  char: lp: detach the device when parallel port is removed
  char: lp: introduce list to save port number
  bus: qcom: remove duplicated include from qcom-ebi2.c
  VMCI: Use memdup_user() rather than duplicating its implementation
  char/rtc: Use of_node_name_eq for node name comparisons
  misc: mic: fix a DMA pool free failure
  ptp: fix an IS_ERR() vs NULL check
  genwqe: Fix size check
  binder: implement binderfs
  binder: fix use-after-free due to ksys_close() during fdget()
  bus: fsl-mc: remove duplicated include files
  bus: fsl-mc: explicitly define the fsl_mc_command endianness
  misc: ti-st: make array read_ver_cmd static, shrinks object size
  ...
</content>
</entry>
<entry>
<title>ptp: fix an IS_ERR() vs NULL check</title>
<updated>2018-12-19T09:18:49Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-12-07T06:00:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9d93594c7679c108ea41dec731df6f986786a19'/>
<id>urn:sha1:b9d93594c7679c108ea41dec731df6f986786a19</id>
<content type='text'>
We recently modified pps_register_source() to return error pointers
instead of NULL but it seems like there was a merge issue and part of
the commit was lost.  Anyway, the ptp_clock_register() function needs to
be updated to check for IS_ERR() as well.

Fixes: 3b1ad360acad ("pps: using ERR_PTR instead of NULL while pps_register_source fails")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ptp: Fix pass zero to ERR_PTR() in ptp_clock_register</title>
<updated>2018-11-24T02:04:02Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2018-11-23T01:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aea0a897af9e44c258e8ab9296fad417f1bc063a'/>
<id>urn:sha1:aea0a897af9e44c258e8ab9296fad417f1bc063a</id>
<content type='text'>
Fix smatch warning:

drivers/ptp/ptp_clock.c:298 ptp_clock_register() warn:
 passing zero to 'ERR_PTR'

'err' should be set while device_create_with_groups and
pps_register_source fails

Fixes: 85a66e550195 ("ptp: create "pins" together with the rest of attributes")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.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: deprecate gettime64() in favor of gettimex64()</title>
<updated>2018-11-10T03:43:51Z</updated>
<author>
<name>Miroslav Lichvar</name>
<email>mlichvar@redhat.com</email>
</author>
<published>2018-11-09T10:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=916444df305ef5b8a7d824aac7dd2aeba3a4db3b'/>
<id>urn:sha1:916444df305ef5b8a7d824aac7dd2aeba3a4db3b</id>
<content type='text'>
When a driver provides gettimex64(), use it in the PTP_SYS_OFFSET ioctl
and POSIX clock's gettime() instead of gettime64(). Drivers should
provide only one of the functions.

Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: add PTP_SYS_OFFSET_EXTENDED ioctl</title>
<updated>2018-11-10T03:43:51Z</updated>
<author>
<name>Miroslav Lichvar</name>
<email>mlichvar@redhat.com</email>
</author>
<published>2018-11-09T10:14:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=361800876f80da3915c46e388fc682532228b2c3'/>
<id>urn:sha1:361800876f80da3915c46e388fc682532228b2c3</id>
<content type='text'>
The PTP_SYS_OFFSET ioctl, which can be used to measure the offset
between a PHC and the system clock, includes the total time that the
driver needs to read the PHC timestamp.

This typically involves reading of multiple PCI registers (sometimes in
multiple iterations) and the register that contains the lowest bits of
the timestamp is not read in the middle between the two readings of the
system clock. This asymmetry causes the measured offset to have a
significant error.

Introduce a new ioctl, driver function, and helper functions, which
allow the reading of the lowest register to be isolated from the other
readings in order to reduce the asymmetry. The ioctl returns three
timestamps for each measurement:
- system time right before reading the lowest bits of the PHC timestamp
- PHC time
- system time immediately after reading the lowest bits of the PHC
  timestamp

Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Signed-off-by: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl</title>
<updated>2018-11-10T03:43:50Z</updated>
<author>
<name>Miroslav Lichvar</name>
<email>mlichvar@redhat.com</email>
</author>
<published>2018-11-09T10:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83d0bdc7390b890905634186baaa294475cd6a06'/>
<id>urn:sha1:83d0bdc7390b890905634186baaa294475cd6a06</id>
<content type='text'>
If a gettime64 call fails, return the error and avoid copying data back
to user.

Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: reorder declarations in ptp_ioctl()</title>
<updated>2018-11-10T03:43:50Z</updated>
<author>
<name>Miroslav Lichvar</name>
<email>mlichvar@redhat.com</email>
</author>
<published>2018-11-09T10:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbb960ac26172215b8dc6635eac13c3a0739d6ed'/>
<id>urn:sha1:fbb960ac26172215b8dc6635eac13c3a0739d6ed</id>
<content type='text'>
Reorder declarations of variables as reversed Christmas tree.

Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Suggested-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: drop redundant kasprintf() to create worker name</title>
<updated>2018-10-29T02:20:06Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2018-10-26T21:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=822c5f7341366bef761e5e49f05bb8b1b0afccee'/>
<id>urn:sha1:822c5f7341366bef761e5e49f05bb8b1b0afccee</id>
<content type='text'>
Building with -Wformat-nonliteral, gcc complains

drivers/ptp/ptp_clock.c: In function ‘ptp_clock_register’:
drivers/ptp/ptp_clock.c:239:26: warning: format not a string literal and no format arguments [-Wformat-nonliteral]
            worker_name : info-&gt;name);

kthread_create_worker takes fmt+varargs to set the name of the
worker, and that happens with a vsnprintf() to a stack buffer (that is
then copied into task_comm). So there's no reason not to just pass
"ptp%d", ptp-&gt;index to kthread_create_worker() and avoid the
intermediate worker_name variable.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_dte: simplify getting .driver_data</title>
<updated>2018-10-23T02:48:35Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2018-10-21T20:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0bfdae013e809b209ac325a9895b9ba22599c93'/>
<id>urn:sha1:c0bfdae013e809b209ac325a9895b9ba22599c93</id>
<content type='text'>
We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
