<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/net/phy/dp83640.c, branch standardize-docs</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-06-23T18:38:16+00:00</updated>
<entry>
<title>net: dp83640: Avoid NULL pointer dereference.</title>
<updated>2017-06-23T18:38:16+00:00</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2017-06-23T15:51:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=db9d8b29d19d2801793e4419f4c6272bf8951c62'/>
<id>urn:sha1:db9d8b29d19d2801793e4419f4c6272bf8951c62</id>
<content type='text'>
The function, skb_complete_tx_timestamp(), used to allow passing in a
NULL pointer for the time stamps, but that was changed in commit
62bccb8cdb69051b95a55ab0c489e3cab261c8ef ("net-timestamp: Make the
clone operation stand-alone from phy timestamping"), and the existing
call sites, all of which are in the dp83640 driver, were fixed up.

Even though the kernel-doc was subsequently updated in commit
7a76a021cd5a292be875fbc616daf03eab1e6996 ("net-timestamp: Update
skb_complete_tx_timestamp comment"), still a bug fix from Manfred
Rudigier came into the driver using the old semantics.  Probably
Manfred derived that patch from an older kernel version.

This fix should be applied to the stable trees as well.

Fixes: 81e8f2e930fe ("net: dp83640: Fix tx timestamp overflow handling.")
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>dp83640: don't recieve time stamps twice</title>
<updated>2017-04-20T20:00:48+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-04-18T19:14:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9d386cd9a755c8293e8916264d4d053878a7c9c7'/>
<id>urn:sha1:9d386cd9a755c8293e8916264d4d053878a7c9c7</id>
<content type='text'>
This patch is prompted by a static checker warning about a potential
use after free.  The concern is that netif_rx_ni() can free "skb" and we
call it twice.

When I look at the commit that added this, it looks like some stray
lines were added accidentally.  It doesn't make sense to me that we
would recieve the same data two times.  I asked the author but never
recieved a response.

I can't test this code, but I'm pretty sure my patch is correct.

Fixes: 4b063258ab93 ("dp83640: Delay scheduled work.")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: dp83640: Use the high resolution frequency method.</title>
<updated>2016-11-10T02:19:53+00:00</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2016-11-08T21:49:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e4788b800f66718f0736bca385da548e48d39b8e'/>
<id>urn:sha1:e4788b800f66718f0736bca385da548e48d39b8e</id>
<content type='text'>
The dp83640 has a frequency resolution of about 0.029 ppb.
This patch lets users of the device benefit from the
increased frequency resolution when tuning the clock.

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>net: dp83640: Fix tx timestamp overflow handling.</title>
<updated>2016-01-21T02:54:08+00:00</updated>
<author>
<name>Manfred Rudigier</name>
<email>Manfred.Rudigier@omicron.at</email>
</author>
<published>2016-01-20T10:22:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=81e8f2e930fe76b9814c71b9d87c30760b5eb705'/>
<id>urn:sha1:81e8f2e930fe76b9814c71b9d87c30760b5eb705</id>
<content type='text'>
PHY status frames are not reliable, the PHY may not be able to send them
during heavy receive traffic. This overflow condition is signaled by the
PHY in the next status frame, but the driver did not make use of it.
Instead it always reported wrong tx timestamps to user space after an
overflow happened because it assigned newly received tx timestamps to old
packets in the queue.

This commit fixes this issue by clearing the tx timestamp queue every time
an overflow happens, so that no timestamps are delivered for overflow
packets. This way time stamping will continue correctly after an overflow.

Signed-off-by: Manfred Rudigier &lt;manfred.rudigier@omicron.at&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>phy: Centralize setting driver module owner</title>
<updated>2016-01-07T19:31:27+00:00</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-01-06T19:11:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=be01da72b1b832b89fbdf59ae6f1b60e53ca2987'/>
<id>urn:sha1:be01da72b1b832b89fbdf59ae6f1b60e53ca2987</id>
<content type='text'>
Rather than have each driver set the driver owner field, do it once in
the core code. This will also help with later changes, when the device
structure will move.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: Add an mdio_device structure</title>
<updated>2016-01-07T19:31:26+00:00</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-01-06T19:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e5a03bfd873c29eb786655ef2e95e53ed242b404'/>
<id>urn:sha1:e5a03bfd873c29eb786655ef2e95e53ed242b404</id>
<content type='text'>
Not all devices attached to an MDIO bus are phys. So add an
mdio_device structure to represent the generic parts of an mdio
device, and place this structure into the phy_device.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dp83640: Only wait for timestamps for packets with timestamping enabled.</title>
<updated>2015-11-03T16:08:22+00:00</updated>
<author>
<name>Stefan Sørensen</name>
<email>stefan.sorensen@spectralink.com</email>
</author>
<published>2015-11-03T08:34:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a1f8723f38921a0216a63d3ec9f01ec1e2813363'/>
<id>urn:sha1:a1f8723f38921a0216a63d3ec9f01ec1e2813363</id>
<content type='text'>
In the packet timestamping function, check that the ptp version and
protocol of the packet matches what we have configured the hardware to
actually generate timestamps for, before looking/waiting for a timestamp.

Signed-off-by: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dp83640: Prune rx timestamp list before reading from it</title>
<updated>2015-11-03T16:08:21+00:00</updated>
<author>
<name>Stefan Sørensen</name>
<email>stefan.sorensen@spectralink.com</email>
</author>
<published>2015-11-03T08:34:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ccf6ee9a6980eff9ec0eeaa8f63c65bff34d9697'/>
<id>urn:sha1:ccf6ee9a6980eff9ec0eeaa8f63c65bff34d9697</id>
<content type='text'>
The list of rx timestamps are currently only pruned of old entries when a
new entry is inserted. If no new entries are added, old timestamps may
survive beyond their lifetime, possible causing them to be attached to
packets with the same sequence number after a rollover.

Signed-off-by: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dp83640: Delay scheduled work.</title>
<updated>2015-11-03T16:08:21+00:00</updated>
<author>
<name>Stefan Sørensen</name>
<email>stefan.sorensen@spectralink.com</email>
</author>
<published>2015-11-03T08:34:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4b063258ab9360207a4f6913d31d761bd85631ab'/>
<id>urn:sha1:4b063258ab9360207a4f6913d31d761bd85631ab</id>
<content type='text'>
Currently rx_timestamp_work reschedules itself as a regular workqueue item,
effectively causing it run constantly as long as there are packets left in
the queue. Fix by using delayed workqueue items, limiting it to run only
every two jiffies.

Signed-off-by: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dp83640: Include hash in timestamp/packet matching</title>
<updated>2015-11-03T16:08:21+00:00</updated>
<author>
<name>Stefan Sørensen</name>
<email>stefan.sorensen@spectralink.com</email>
</author>
<published>2015-11-03T08:34:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=539e44d26855fdd198280ee41360a0b3adcf699b'/>
<id>urn:sha1:539e44d26855fdd198280ee41360a0b3adcf699b</id>
<content type='text'>
Only using the message type and sequence id for matching timestamps
with packets is error prone, as multiple clients may very well be
sending packets with the same messagetype and timestamp at the same
time. Fix by extending the check to include the hash of bytes 20-29
(source id in PTPv2) that is provided with the timestamps.

Signed-off-by: Stefan Sørensen &lt;stefan.sorensen@spectralink.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
