mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Yajun Deng <yajun.deng@linux.dev>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: Add c45_phy_ids sysfs entry
Date: Fri, 23 May 2025 15:55:07 +0200	[thread overview]
Message-ID: <2eec1d17-a6d1-4859-9cc9-43eeac23edbd@lunn.ch> (raw)
In-Reply-To: <20250523132606.2814-1-yajun.deng@linux.dev>

> +What:		/sys/class/mdio_bus/<bus>/<device>/c45_phy_ids
> +Date:		May 2025
> +KernelVersion:	6.16
> +Contact:	netdev@vger.kernel.org
> +Description:
> +		This attribute contains the 32-bit PHY Identifier as reported
> +		by the device during bus enumeration, encoded in hexadecimal.
> +		These C45 IDs are used to match the device with the appropriate
> +		driver.

https://docs.kernel.org/filesystems/sysfs.html#attributes

  Attributes should be ASCII text files, preferably with only one
  value per file. It is noted that it may not be efficient to contain
  only one value per file, so it is socially acceptable to express an
  array of values of the same type.

These are static values, so efficiency is not an issue.

It might be better to have a directory
/sys/class/mdio_bus/<bus>/<device>/c45_phy_ids and then for each MMD
create a file. I would also suggest using is_visible() == 0 for those
with an ID == 0.

	Andrew

  reply	other threads:[~2025-05-23 13:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 13:26 Yajun Deng
2025-05-23 13:55 ` Andrew Lunn [this message]
2025-05-26  8:11   ` Yajun Deng
2025-05-26  8:19     ` Russell King (Oracle)
2025-05-26  8:52       ` Yajun Deng
2025-05-26 14:02         ` Andrew Lunn
2025-05-28 13:08         ` Russell King (Oracle)
2025-05-29  1:51           ` Yajun Deng

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=2eec1d17-a6d1-4859-9cc9-43eeac23edbd@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yajun.deng@linux.dev \
    /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

all inboxes | Powered by JetHome®