From: Andrew Lunn <andrew@lunn.ch>
To: Paul SAGE <paul.sage@42.fr>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, linux-kernel@vger.kernel.org,
mchan@broadcom.com, netdev@vger.kernel.org, pabeni@redhat.com,
pavan.chebbi@broadcom.com, vinc@42.fr
Subject: Re: Andrew Lunn
Date: Mon, 27 Oct 2025 14:01:28 +0100 [thread overview]
Message-ID: <76aaa176-9012-4897-9403-92802610188c@lunn.ch> (raw)
In-Reply-To: <20251027095139.399855-1-paul.sage@42.fr>
On Mon, Oct 27, 2025 at 10:51:39AM +0100, Paul SAGE wrote:
> The tg3 currently call eth_platform_get_mac_address to retrieve the
> MAC address from the device tree before trying the mailbox,
> NVRAM and MAC registers.
> However, this function only retrieves the MAC address from the device
> tree using of_get_mac_address.
>
> We are using device_get_mac_address, which use fwnode to obtain a MAC
> address using the ACPI, so as we understand fwnode is an
> abstraction layer for both the device tree (on ARM) and ACPI (on x86)
>
> If true, it could be appropriate to replace the call to replace
> eth_platform_get_mac_address with device_get_mac_address. This would
> avoid running the entire function only to later check for a dummy
> address.
>
> Do you see any regression possible with this change ?
I don't know ACPI too well, DT is more advanced, and i tend to keep to
ARM platforms.
Does ACPI actually have a standardised mechanism for storing MAC
address? Is there anything in the standard?
If you do make use of device_get_mac_address(), how is the MAC address
stored in ACPI?
Documentation/firmware-guide/acpi/dsd/phy.rst says:
These properties are defined in accordance with the "Device
Properties UUID For _DSD" [dsd-guide] document and the
daffd814-6eba-4d8c-8a91-bc9bbf4aa301 UUID must be used in the Device
Data Descriptors containing them.
Is that what you are doing?
Have you looked through other MAC drivers? Are there any others
getting the MAC address from ACPI? Is it all proprietary, or is there
some standardisation?
If you do decide ACPI is missing this, and you want to move forward,
please also add a document under Documentation/firmware-guide/acpi/dsd
describing it.
Andrew
prev parent reply other threads:[~2025-10-27 13:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 16:08 [PATCH] tg3: replace placeholder MAC address with device property Paul SAGE
2025-10-23 17:14 ` Florian Fainelli
2025-10-23 19:05 ` Andrew Lunn
2025-10-27 9:51 ` Andrew Lunn Paul SAGE
2025-10-27 13:01 ` Andrew Lunn [this message]
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=76aaa176-9012-4897-9403-92802610188c@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul.sage@42.fr \
--cc=pavan.chebbi@broadcom.com \
--cc=vinc@42.fr \
/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®