<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/ptp, branch linux-5.12.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2021-06-23T12:44:00+00:00</updated>
<entry>
<title>ptp: improve max_adj check against unreasonable values</title>
<updated>2021-06-23T12:44:00+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-06-14T22:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=220c3c36b1f846dab94842e2827bf685d817ac17'/>
<id>urn:sha1:220c3c36b1f846dab94842e2827bf685d817ac17</id>
<content type='text'>
[ Upstream commit 475b92f932168a78da8109acd10bfb7578b8f2bb ]

Scaled PPM conversion to PPB may (on 64bit systems) result
in a value larger than s32 can hold (freq/scaled_ppm is a long).
This means the kernel will not correctly reject unreasonably
high -&gt;freq values (e.g. &gt; 4294967295ppb, 281474976645 scaled PPM).

The conversion is equivalent to a division by ~66 (65.536),
so the value of ppb is always smaller than ppm, but not small
enough to assume narrowing the type from long -&gt; s32 is okay.

Note that reasonable user space (e.g. ptp4l) will not use such
high values, anyway, 4289046510ppb ~= 4.3x, so the fix is
somewhat pedantic.

Fixes: d39a743511cd ("ptp: validate the requested frequency adjustment.")
Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ptp: ocp: Fix a resource leak in an error handling path</title>
<updated>2021-06-03T07:09:46+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-05-12T11:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0e38e702f1152479e6afac34f151dbfd99417f99'/>
<id>urn:sha1:0e38e702f1152479e6afac34f151dbfd99417f99</id>
<content type='text'>
[ Upstream commit 9c1bb37f8cad5e2ee1933fa1da9a6baa7876a8e4 ]

If an error occurs after a successful 'pci_ioremap_bar()' call, it must be
undone by a corresponding 'pci_iounmap()' call, as already done in the
remove function.

Fixes: a7e1abad13f3 ("ptp: Add clock driver for the OpenCompute TimeCard.")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation</title>
<updated>2021-03-24T19:10:03+00:00</updated>
<author>
<name>Yangbo Lu</name>
<email>yangbo.lu@nxp.com</email>
</author>
<published>2021-03-23T08:02:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f51d7bf1dbe5522c51c93fe8faa5f4abbdf339cd'/>
<id>urn:sha1:f51d7bf1dbe5522c51c93fe8faa5f4abbdf339cd</id>
<content type='text'>
Current calculation for diff of TMR_ADD register value may have
64-bit overflow in this code line, when long type scaled_ppm is
large.

adj *= scaled_ppm;

This patch is to resolve it by using mul_u64_u64_div_u64().

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_clockmatrix: clean-up - parenthesis around a == b are unnecessary</title>
<updated>2021-02-17T21:49:26+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=77fdb168a3e2a633fd8e5a0c9ecadcb86c9372cb'/>
<id>urn:sha1:77fdb168a3e2a633fd8e5a0c9ecadcb86c9372cb</id>
<content type='text'>
Code clean-up.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clockmatrix: Simplify code - remove unnecessary `err` variable.</title>
<updated>2021-02-17T21:49:26+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fde3b3a7069e380f3a8b74e77b9eff15b7f8c878'/>
<id>urn:sha1:fde3b3a7069e380f3a8b74e77b9eff15b7f8c878</id>
<content type='text'>
Code clean-up.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clockmatrix: Coding style - tighten vertical spacing.</title>
<updated>2021-02-17T21:49:26+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fcfd37573a09f1998bc58a712be432aa7eae7bc2'/>
<id>urn:sha1:fcfd37573a09f1998bc58a712be432aa7eae7bc2</id>
<content type='text'>
Code clean-up.

* Remove blank line between variable declarations.
* Remove blank line between:
	err = blah(...)

	if (err)
		...
* Remove unnecessary blank line before/after loop constructs.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clockmatrix: Clean-up dev_*() messages.</title>
<updated>2021-02-17T21:49:26+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1c49d3e947783b1ac9cf5d9a2489baa63a35a371'/>
<id>urn:sha1:1c49d3e947783b1ac9cf5d9a2489baa63a35a371</id>
<content type='text'>
Code clean-up.

* Remove unnecessary \n termination from dev_*() messages.
* Remove 'char *fmt' to define strings to stay within 80 column
  limit.  Not needed since coding guidelines increased to
  100 columns limit.
  Keeping format in place allows static code checkers to
  validate the arguments.
* Tighten up vertical spacing.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clockmatrix: Remove unused header declarations.</title>
<updated>2021-02-17T21:49:25+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=10c270cf25bd3ebffba9c2182d0c9eccecf10d97'/>
<id>urn:sha1:10c270cf25bd3ebffba9c2182d0c9eccecf10d97</id>
<content type='text'>
Removed unused header declarations.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: ptp_clockmatrix: Add alignment of 1 PPS to idtcm_perout_enable.</title>
<updated>2021-02-17T21:49:25+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e8b4d8b542b167b101aaaa308dc3be39da9f59d0'/>
<id>urn:sha1:e8b4d8b542b167b101aaaa308dc3be39da9f59d0</id>
<content type='text'>
When enabling output using PTP_CLK_REQ_PEROUT, need to align the output
clock to the internal 1 PPS clock.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.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: ptp_clockmatrix: Add wait_for_sys_apll_dpll_lock.</title>
<updated>2021-02-17T21:49:25+00:00</updated>
<author>
<name>Vincent Cheng</name>
<email>vincent.cheng.xh@renesas.com</email>
</author>
<published>2021-02-17T05:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=797d3186544fcd5bfd7a03b9ef3e20c1db3802b8'/>
<id>urn:sha1:797d3186544fcd5bfd7a03b9ef3e20c1db3802b8</id>
<content type='text'>
Part of the device initialization aligns the rising edge of the output
clock to the internal 1 PPS clock. If the system APLL and DPLL is not
locked, then the alignment will fail and there will be a fixed offset
between the internal 1 PPS clock and the output clock.

After loading the device firmware, poll the system APLL and DPLL for
locked state prior to initialization, timing out after 2 seconds.

Signed-off-by: Vincent Cheng &lt;vincent.cheng.xh@renesas.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>
