From: Florian Fainelli <f.fainelli@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: phy: Expose phydev::dev_flags through sysfs
Date: Wed, 10 Mar 2021 14:50:50 -0800 [thread overview]
Message-ID: <ca946873-3872-dbc2-3331-d388782bd17e@gmail.com> (raw)
In-Reply-To: <20210310144848.53ffbbd9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
On 3/10/21 2:48 PM, Jakub Kicinski wrote:
> On Wed, 10 Mar 2021 14:12:43 -0800 Florian Fainelli wrote:
>> phydev::dev_flags contains a bitmask of configuration bits requested by
>> the consumer of a PHY device (Ethernet MAC or switch) towards the PHY
>> driver. Since these flags are often used for requesting LED or other
>> type of configuration being able to quickly audit them without
>> instrumenting the kernel is useful.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> Documentation/ABI/testing/sysfs-class-net-phydev | 12 ++++++++++++
>> drivers/net/phy/phy_device.c | 11 +++++++++++
>> 2 files changed, 23 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-net-phydev b/Documentation/ABI/testing/sysfs-class-net-phydev
>> index 40ced0ea4316..ac722dd5e694 100644
>> --- a/Documentation/ABI/testing/sysfs-class-net-phydev
>> +++ b/Documentation/ABI/testing/sysfs-class-net-phydev
>> @@ -51,3 +51,15 @@ Description:
>> Boolean value indicating whether the PHY device is used in
>> standalone mode, without a net_device associated, by PHYLINK.
>> Attribute created only when this is the case.
>> +
>> +What: /sys/class/mdio_bus/<bus>/<device>/phy_dev_flags
>> +Date: March 2021
>> +KernelVersion: 5.13
>> +Contact: netdev@vger.kernel.org
>> +Description:
>> + 32-bit hexadecimal number representing a bit mask of the
>> + configuration bits passed from the consumer of the PHY
>> + (Ethernet MAC, switch, etc.) to the PHY driver. The flags are
>> + only used internally by the kernel and their placement are
>> + not meant to be stable across kernel versions. This is intended
>> + for facilitating the debugging of PHY drivers.
>
> Why not debugfs, then?
>
Mostly for consistency with what we already have exposed, I suppose that
could be moved to debugfs.
--
Florian
next prev parent reply other threads:[~2021-03-10 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 22:12 [PATCH net-next] net: phy: Expose phydev::dev_flags through sysfs Florian Fainelli
2021-03-10 22:48 ` Jakub Kicinski
2021-03-10 22:50 ` Florian Fainelli [this message]
2021-03-11 20:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca946873-3872-dbc2-3331-d388782bd17e@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).