Re: [Intel-wired-lan] [PATCH 2/2] igc: wait for the MAC copy when enabled MAC passthrough

From: Neftin, Sasha
Date: Thu Jul 08 2021 - 00:24:45 EST

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.