Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4162850rdb; Thu, 14 Sep 2023 13:52:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHR1JTrlgDh8TmkuuYax1+PSCirDbTQcIs/OEBJOpqfKm/l9/be3lx6zulMet/4cMfRML8t X-Received: by 2002:a17:902:e5cb:b0:1bc:422a:b9fd with SMTP id u11-20020a170902e5cb00b001bc422ab9fdmr8034959plf.13.1694724739644; Thu, 14 Sep 2023 13:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694724739; cv=none; d=google.com; s=arc-20160816; b=1EyvgR13OdwjffhX8mpKt8ivB9shvQYV5UPXP1ugwj/h1QYuoEuwLD6OAkxpMVJnkt i/iZxsGOmB4OwkvON3Mp9hC0mBR/8oOM4DS6bW0x7okovWSJguLJrTjChYN6Ae6I4X+A VhcJjq80wU9VD7h177lRumLLgjIfO8ukEMiCFn+D+SfKSWrX8Rl4j7tZOjBqEiWPiKGs /Vr6f2wrqsBOrPQTIWLsI8WDBdFLoFBzV3N42JnHD0+CnxaWEqGauK4knIs9E6TCW0BX 6nwooYuhjo7iT9d5MhPtVmsRtwq4Z+aVUTmoj2QeR1IeTMl7Fa8wNU/snenz8fCEOg0m Xj9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=EUAQM9nUVDpynXNTWZkPqYipd38tYN+dKS0WVUg2qcc=; fh=FI2F/1SRtithlmtgaJdCOIBxk76HoiEqP71c/Cs1KgA=; b=pDXuEVFeWNmsQryPPAQbtvEb7Y9kDjioVU6y6YorRjWkmFpKuELOZEcGoy8W2fh22G Bb1f2a4mXgamr6oYossQTlsKUeYETqwP1CXSK7hmCawD+M4+ELNoUu7yEXSjj22aLtwI 0C2sEsc6477twGtrg3wOKvQA4arAdKGDIueIOezL/qfJTjzymFczMJTOeS/Ht7Z0Xc6n URCKm1Dn6pDnLR+hkq2QSaCaupB+5EgPjBZgKtZkveo7sX0Mn/KF1is3pD+v6upuFXCe E5AVZ6OwooxZYVCS+9bUhcepadWl/DprlBNPUimahDh1K890KQvLODN3rIuPB0GmwjaH ugnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VeTPCGHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id i4-20020a170902eb4400b001bde5c68aedsi2149982pli.251.2023.09.14.13.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:52:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VeTPCGHI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 6C30A8315055; Wed, 13 Sep 2023 09:54:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229533AbjIMQyj (ORCPT + 99 others); Wed, 13 Sep 2023 12:54:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjIMQyi (ORCPT ); Wed, 13 Sep 2023 12:54:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 51280B7 for ; Wed, 13 Sep 2023 09:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694624031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EUAQM9nUVDpynXNTWZkPqYipd38tYN+dKS0WVUg2qcc=; b=VeTPCGHIsqZjnHz3UFDpzjbRcws5NXTSViA4/I4m8kj97VyeBZVmtnIhQ4n0pYGJPlerlD lsngGchpti5dYDlomb1y/Yzx+pHLqYd2trsF89m7BuAsEd5rqqngJ0hOnniQhipiW8UycQ Q9P70EydHuY6c8dJJOD1rjGMhI/SX9Q= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-141-Z7u4_OUeM9G3zYzju-YFOA-1; Wed, 13 Sep 2023 12:53:50 -0400 X-MC-Unique: Z7u4_OUeM9G3zYzju-YFOA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5009f4c933cso7543597e87.1 for ; Wed, 13 Sep 2023 09:53:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694624028; x=1695228828; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EUAQM9nUVDpynXNTWZkPqYipd38tYN+dKS0WVUg2qcc=; b=CynT6LunMbxRGlwAa3LYMfphPojnTrMMRdKXARX1Ar8Cis68/6ceb9CFvOgWWDOP19 PPxhyAAupNj33bIh2lZcu74lpXT/r4Eo0c9cUGkSQfDAN65//+0+d35/miCjB6ZP8FAp tzrgUTiJwOgGS7Z7N/Rh2nQR0IFMrlOKoz188DYBKfpRloL7kYEIRJfgpiJYLbLk2zRE e6yR9OREkQHw3390IkAUHRvKM13ohrIiwbVi91Z78ZTjxs95V5Rn7e0hwLqS55xMO0ob RNstQrHXWtvvvc4cp3Q0rm7W+dFsEvH7XHj7x7EbWfkEESExkefrHGZ06AH6uA5BKMhE TN1w== X-Gm-Message-State: AOJu0YxBbouj7L+HIly3tkKykEBodBSGlHI88UbUNwOR+DeopoWQ93RT 2zalmXGOEp9kKyMQa5IfuQ0skibtYb9Wvx6wHvxjefTlQDxcXqkxRYIu1rbmgLfBwgwar7pkc3j JqCCsGP7Sc2vskXiec7tBaI8Y X-Received: by 2002:a05:6512:3050:b0:4fe:49d:6ae2 with SMTP id b16-20020a056512305000b004fe049d6ae2mr3681520lfb.0.1694624028524; Wed, 13 Sep 2023 09:53:48 -0700 (PDT) X-Received: by 2002:a05:6512:3050:b0:4fe:49d:6ae2 with SMTP id b16-20020a056512305000b004fe049d6ae2mr3681506lfb.0.1694624028147; Wed, 13 Sep 2023 09:53:48 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id sb5-20020a170906edc500b0099bc0daf3d7sm8758990ejb.182.2023.09.13.09.53.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 09:53:47 -0700 (PDT) Message-ID: <50da04e3-5e12-89d3-e3ad-f2ff4533a615@redhat.com> Date: Wed, 13 Sep 2023 18:53:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] platform/x86: thinkpad_acpi: sysfs interface to auxmac To: Mark Pearson , Fernando Eckhardt Valle , Henrique de Moraes Holschuh , "markgross@kernel.org" , ibm-acpi-devel@lists.sourceforge.net, "platform-driver-x86@vger.kernel.org" , linux-kernel@vger.kernel.org References: <20230906195204.4478-1-fevalle@ipt.br> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 13 Sep 2023 09:54:40 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 >> >> 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