Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp97970pxv; Wed, 7 Jul 2021 21:27:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZkQSPbW5H7DxMf6dw3TXEhc87KQfVpLrjBln3rpjfbbzTrkgEnhi90S7qfm+RsZFa8tlZ X-Received: by 2002:a17:907:94ca:: with SMTP id dn10mr28164711ejc.431.1625718421677; Wed, 07 Jul 2021 21:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625718421; cv=none; d=google.com; s=arc-20160816; b=ZUPMBuejiefJa18dnMrK5EpCrtu7fApr6QjmY16aRrn1EctFCS7kgXvBSRRroNJnp3 kRna59rVju3/BZwXb4EK2jTdKFPeKROybLRXx9YiUXobEqsXg8/qlQ+TN2ddkoogU+7o +lZ/aV6mo0naoOJ9qsPkjfIsM0aTgtIkEe9LvbarIzyG9tgNBetP9MChktTqRjfIAGCq VsKw9hErCpZhv/VPNHowp7aNb7HAKxkX/1wCcop6Nz6pa7zl3+gQCh1UD/XfholPsCTd ae9++NPhEOut5DhzsmIuItzWnBnMv2fDdDR/wlJ8LZ7Rx0orJJl2rKqkC6PJg6YYY83S kBdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=btUR8RpoKe7Yp0iqu9mV8jybevwNAZ/nJO7Sf3SFTUs=; b=MLBsLjW8m0fnQm9yJP9viGKWV3hvsy3UhmOwvwbQ6AvuhOzNe+r2mi40iMbFA7nTjh kCiGogyXBEy2iVu4K+/ip4Df3DVoRfzwDC0NLRu7YX9sODWzk6SJZ/BmC4uIdw+TLkkA EmWNG83OJLDsfx2hL5A5hL5WGMc1C62qKoR/acRDhuEje8qb4djLqyh/nIliC7gvDoac OlCpfaGZ5MyTSK/ejcexqOinrmkFdQf/m6w8QvblpJigGWnyg4RjnPoE4EyP2OqNszc7 X+jLwyJeHVqzsPuDTQdSmvqurWAf6J1iG/DbVSRYAgLPZC89nX1XqBE7ujZ0BaaRFVr7 ooZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si1577032ejg.596.2021.07.07.21.26.38; Wed, 07 Jul 2021 21:27:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbhGHE1Y (ORCPT + 99 others); Thu, 8 Jul 2021 00:27:24 -0400 Received: from mga03.intel.com ([134.134.136.65]:31750 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbhGHE1Y (ORCPT ); Thu, 8 Jul 2021 00:27:24 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10038"; a="209480889" X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="209480889" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 21:24:41 -0700 X-IronPort-AV: E=Sophos;i="5.84,222,1620716400"; d="scan'208";a="487400097" Received: from sneftin-mobl.ger.corp.intel.com (HELO [10.185.169.17]) ([10.185.169.17]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 21:24:38 -0700 Subject: Re: [Intel-wired-lan] [PATCH 2/2] igc: wait for the MAC copy when enabled MAC passthrough To: Aaron Ma , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Edri, Michael" , "Ruinskiy, Dima" , "Shalev, Avi" References: <20210702045120.22855-1-aaron.ma@canonical.com> <20210702045120.22855-2-aaron.ma@canonical.com> <613e2106-940a-49ed-6621-0bb00bc7dca5@intel.com> <96106dfe-9844-1d9d-d865-619d78a0d150@canonical.com> From: "Neftin, Sasha" Message-ID: <47117935-10d6-98e0-5894-ba104912ce25@intel.com> Date: Thu, 8 Jul 2021 07:24:35 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <96106dfe-9844-1d9d-d865-619d78a0d150@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/6/2021 09:46, Aaron Ma wrote: > > On 7/5/21 7:54 PM, Neftin, Sasha wrote: >> Hello Aaron, Thanks to point me on this document. I see... This is >> recommendation for Windows driver. Anyway, "delay" approach is >> error-prone. We need rather ask for MNG FW confirmation (message) that >> MAC address is copied. >> Can we call (in case we know that MNG FW copied MAC address): >> igc_rar_set (method from igc_mac.c), update the mac.addr and then >> perform": memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);? > > Without delay, after igc_rar_set, the MAC address is all 0. > The MAC addr is the from dock instead of MAC passthrough with the > original driver. I would to like suggest checking the following direction: 1. principal question: can we update the netdev device address after it is already set during probe? I meant perform another: memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len) up to demand 2. We need to work with Intel's firmware engineer/group and define the message/event: MAC addressis changed and should be updated. As I know MNG FW updates shadow registers. Since shadow registers are different from RAL/RAH registers - it could be a notification that the MAC address changed. Let's check it. > > Thanks, > Aaron