Thread (15 messages) flat view 15 messages, 3 authors, 2012-09-24

Re: [PATCH net-next 3/3] ptp: derive the device name from the parent device

From: Ben Hutchings <hidden>
Date: 2012-09-21 19:01:50

On Fri, 2012-09-21 at 20:40 +0200, Richard Cochran wrote:
On Fri, Sep 21, 2012 at 07:23:03PM +0100, Ben Hutchings wrote:
quoted
I think what I'm still missing from you is some explanation of what the
'clock name' is meant to be used as - a type name, a unique identifier,
a 'friendly name' for listing clocks in a user interface?
The original idea was a type/friendly kind of thing.

Imagine you are the admin of some random box that should run PTP. You
do 'cat /sys/class/ptp/ptp0/clock_name' and see "gianfar clock". Then
you think to yourself, "Excellent, I know that one, it works great,
and I can even get a PPS output."

But if you saw "IXP46X timer" then you would think, "Forget it, this
will never work."

That was the idea.

But before the ethtool thing came along, people started putting MAC
addresses in that string, and it continued even after the ethtool
method appeared. I wanted to correct the MAC abuses, but then I
thought you were concurring with putting some kind of semi-unique
device ID there.
I was confused about whether it was actually meant to be unique.

The ethtool command is useful but setting the parent device may be even
more useful, e.g. you will be able to write udev rules for PHC devices
based on the parent device's identity.
I really don't care too much about the clock_name anyhow, because I
always know my own hardware. I don't mind changing it from type-string
or friendly-name to device ID, if people think that is more useful.
I don't mind either, just so long as the rule is either (1) implemented
in the PTP core code or (2) made very clear to driver writers.

The lack of a parent for the IXP device makes (1) hard to do well.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help