Linux-mediatek Archive mirror
 help / color / mirror / Atom feed
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
	Daniel Golle <daniel@makrotopia.org>,
	DENG Qingfang <dqfext@gmail.com>,
	Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: Bartel Eerdekens <bartel.eerdekens@constell8.be>,
	mithat.guner@xeront.com, erkin.bozoglu@xeront.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next v2 1/2] net: dsa: mt7530-mdio: read PHY address of switch from device tree
Date: Wed, 17 Apr 2024 10:02:30 +0300	[thread overview]
Message-ID: <48cabb89-e3bb-4f72-b6fc-024b6900149d@arinc9.com> (raw)
In-Reply-To: <050ef345-9f4c-437c-863b-fdb8e2a47041@gmail.com>

On 17/04/2024 06:09, Florian Fainelli wrote:
> 
> 
> On 4/16/2024 1:32 AM, Arınç ÜNAL wrote:
>> On 15/04/2024 18:30, Florian Fainelli wrote:
>>> I would go a step further and name phy_addr switch_mdio_addr, or something along those lines to clearly denote this is not a per-port PHY address neither a proper PHY device, but we've already had a similar discussion before about spelling this out clearly as a "pseudo PHY"....
>>
>> I am fine with calling the switch operating on an MDIO bus a psuedo-PHY.
>> But I don't believe this grants making up names on our own instead of using
>> the name described in IEEE Std 802.3-2022. The switch listens on a PHY
>> address on the MDIO bus. 
> 
> The switch listens at a particular address on the MDIO bus, that is the key thing. Whether the addressable device happens to be an Ethernet/SATA/PCIe/USB PHY, an accelerometer, a light switch or an Ethernet switch does not matter as long as it is addressable over clause 22 and/or 45. For all that matters the switch's MDIO interface is not a PHY, otherwise its registers 0-15 would be abiding by the IEEE 802.3-2022 standard, and that is not the case.

I don't deny anything you've said here. I just don't see how this
constitutes making up a different name. The field which the address is
stored is called "PHYAD (PHY Address)". The PHY Address field of the
management frame structure the switch implements is still Clause 22
conformant, as far as I understand.

> 
>> The description for the phy_addr member of the
>> mt753x_info structure clearly explains that so I don't see a reason to
>> change the variable name.
> 
> IMHO it is clearer to use mdiodev->addr through and through, the shorthand is not necessary and does not save that many characters to type in the first place. Saving a mdiodev pointer into mt7530_priv and accessing priv->mdiodev->addr would be 18 characters to type versus 14 with priv->phy_addr.

Fine by me, I can do that.

Arınç


  reply	other threads:[~2024-04-17  7:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14  6:07 [PATCH net-next v2 0/2] Read PHY address of switch from device tree on MT7530 DSA subdriver Arınç ÜNAL via B4 Relay
2024-04-14  6:07 ` [PATCH net-next v2 1/2] net: dsa: mt7530-mdio: read PHY address of switch from device tree Arınç ÜNAL via B4 Relay
2024-04-14  8:17   ` Arınç ÜNAL
2024-04-15 15:30   ` Florian Fainelli
2024-04-16  8:32     ` Arınç ÜNAL
2024-04-17  3:09       ` Florian Fainelli
2024-04-17  7:02         ` Arınç ÜNAL [this message]
2024-04-14  6:07 ` [PATCH net-next v2 2/2] net: dsa: mt7530: simplify core operations Arınç ÜNAL via B4 Relay

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=48cabb89-e3bb-4f72-b6fc-024b6900149d@arinc9.com \
    --to=arinc.unal@arinc9.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bartel.eerdekens@constell8.be \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=erkin.bozoglu@xeront.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mithat.guner@xeront.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).