From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 948C2C07E9C for ; Thu, 8 Jul 2021 04:24:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D1946141E for ; Thu, 8 Jul 2021 04:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbhGHE1Z (ORCPT ); Thu, 8 Jul 2021 00:27:25 -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