[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eea70076-891c-5caa-a590-ef1b0421f3b2@gmail.com>
Date: Mon, 30 Apr 2018 09:30:03 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, andrew@...n.ch, rmk@...linux.org.uk,
linux-kernel@...r.kernel.org, cphealy@...il.com,
nikita.yoush@...entembedded.com,
vivien.didelot@...oirfairelinux.com, Nisar.Sayed@...rochip.com,
UNGLinuxDriver@...rochip.com
Subject: Re: [RFC net-next 0/5] Support for PHY test modes
On 04/29/2018 07:55 PM, David Miller wrote:
> From: Florian Fainelli <f.fainelli@...il.com>
> Date: Fri, 27 Apr 2018 17:32:30 -0700
>
>> This patch series adds support for specifying PHY test modes through
>> ethtool and paves the ground for adding support for more complex
>> test modes that might require data to be exchanged between user and
>> kernel space.
>>
>> As an example, patches are included to add support for the IEEE
>> electrical test modes for 100BaseT2 and 1000BaseT. Those do not
>> require data to be passed back and forth.
>>
>> I believe the infrastructure to be usable enough to add support for
>> other things like:
>>
>> - cable diagnostics
>> - pattern generator/waveform generator with specific pattern being
>> indicated for instance
>>
>> Questions for Andrew, and others:
>>
>> - there could be room for adding additional ETH_TEST_FL_* values in order to
>> help determine how the test should be running
>> - some of these tests can be disruptive to connectivity, the minimum we could
>> do is stop the PHY state machine and restart it when "normal" is used to exit
>> those test modes
>>
>> Comments welcome!
>
> Generally, no objection to providing this in the general manner you
> have implemented it via ethtool.
Thanks for taking a look!
>
> I think in order to answer the disruptive question, you need to give
> some information about what kind of context this stuff would be
> used in, and if in those contexts what the user expectations are
> or might be.
>
> Are these test modes something that usually would be initiated with
> the interface down?
We expect that these commands/tests would likely be issued when the
interface is up (not necessarily with a carrier state ON though) because
we know for sure that drivers will have successfully connected to their
PHY and there is no power management (or there is, like runtime PM)
which will not prevent accesses to the MDIO interface from working.
Turning these tests on will typically result in the link partner
dropping the link with us, and the interface will be non-functional as
far as the data path is concerned (similar to an isolation mode). This
might warrant properly reporting that to user-space through e.g: a
private IFF_* value maybe?
--
Florian
Powered by blists - more mailing lists