From: "Fernando Eckhardt Valle (FIPT)" <fevalle@ipt.br>
To: Hans de Goede <hdegoede@redhat.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
"markgross@kernel.org" <markgross@kernel.org>,
"ibm-acpi-devel@lists.sourceforge.net"
<ibm-acpi-devel@lists.sourceforge.net>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: sysfs interface to auxmac
Date: Thu, 14 Sep 2023 00:12:09 +0000 [thread overview]
Message-ID: <CPVP152MB505396FEC33D76B78586807FD8F7A@CPVP152MB5053.LAMP152.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <50da04e3-5e12-89d3-e3ad-f2ff4533a615@redhat.com>
Hi Mark, hi Hans,
All correct Mark, thanks!
Thanks for the review Hans, I'm already doing the v2.
Just a note: there are some Lenovo Thunderbolt 4 docks that have 2 ethernet devices inside, an intel ethernet device (loads igc driver, works with CPUs with vPRO feature) and a realtek ethernet device (realtek driver, works with CPU without vPRO feature). At this moment mac addr pass through doesn't work correctly in these docking station if the Thinkpad CPU has vPRO feature, and as Mark said, the idea is to release an open source application to work with the mac addr pt correctly.
Regards,
Fernando
________________________________________
From: Hans de Goede <hdegoede@redhat.com>
Sent: Wednesday, September 13, 2023 1:53 PM
To: Mark Pearson; Fernando Eckhardt Valle (FIPT); Henrique de Moraes Holschuh; markgross@kernel.org; ibm-acpi-devel@lists.sourceforge.net; platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: thinkpad_acpi: sysfs interface to auxmac
Hi Mark, Fernando,
On 9/13/23 18:41, Mark Pearson wrote:
>
>
> On Wed, Sep 13, 2023, at 11:58 AM, Hans de Goede wrote:
>> Hi Fernando,
>>
>> On 9/6/23 21:52, Fernando Eckhardt Valle wrote:
>>> Newer Thinkpads have a feature called Mac Address Passthrough.
>>> This patch provides a sysfs interface that userspace can use
>>> to get this auxiliary mac address.
>>>
>>> Signed-off-by: Fernando Eckhardt Valle <fevalle@ipt.br>
>>
>> Thank you for your patch.
>>
>> At a minimum for this patch to be accepted you will need
>> to document the new sysfs interface in:
>>
>> Documentation/admin-guide/laptops/thinkpad-acpi.rst
>>
>> But I wonder if we should export this information to
>> userspace in this way ?
>>
>> The reason why I'm wondering is because mac-address passthrough
>> in case of using e.g. Lenovo Thunderbolt docks is already
>> supported by the kernel by code for this in drivers/net/usb/r8152.c :
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/usb/r8152.c#n1613
>>
>> So I'm wondering if we really need this, is there a planned
>> userspace API consumer of the new sysfs interface ?
>>
>> Or is this only intended as a way for a user to query this, iow
>> is this purely intended for informational purposes ?
>>
> Hi Hans,
>
> We've previously had strong pushback from the maintainers in the net tree that the MAC passthru should not be done there and should be done in user-space. I'd have to dig up the threads, but there was a preference for it to not be done in the kernel (and some frustrations at having vendor specific changes in the net driver).
>
> We've also seen various timing issues (some related to ME FW doing it's thing) that makes it tricky to handle in the kernel - with added delays being needed leading to patches that can't be accepted.
>
> This approach is one of the steps towards fixing this. Fernando did discuss and review this with me beforehand (apologies - I meant to add a note saying I'd been involved). If you think there is a better approach please let us know, but we figured as this is a Lenovo specific thing it made sense to have it here in thinkpad_acpi.
>
> There will be a consumer (I think it's a script and udev rule) to update the MAC if a passthru-MAC address is provided via the BIOS. This will be open-source, but we haven't really figured out how to release it yet.
>
> Fernando - please correct anything I've gotten wrong!
Ah that is all good to know. That pretty much takes care of
my objections / answers my questions.
Fernando can you please submit a v2 which:
1. Adds documentation as mentioned already
2. Moves the special handling of "XXXXXXXXXXXX" from show()
to init() (writing to auxmac[] in show() is a bit weird,
also we only need to do this once, so it is init code)
Regards,
Hans
prev parent reply other threads:[~2023-09-14 0:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 19:52 Fernando Eckhardt Valle
2023-09-13 15:58 ` Hans de Goede
2023-09-13 16:41 ` Mark Pearson
2023-09-13 16:53 ` Hans de Goede
2023-09-14 0:12 ` Fernando Eckhardt Valle (FIPT) [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=CPVP152MB505396FEC33D76B78586807FD8F7A@CPVP152MB5053.LAMP152.PROD.OUTLOOK.COM \
--to=fevalle@ipt.br \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@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
all inboxes | Powered by JetHome®