Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1238593pxv; Thu, 1 Jul 2021 21:54:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIwfuR4+HJTofKAiEcwX+A4AzW/rMhgNf08LANCliCZYgqSUWv88jNdrsZ7n9OAvU7/8oz X-Received: by 2002:a05:6402:35cd:: with SMTP id z13mr4242393edc.2.1625201652023; Thu, 01 Jul 2021 21:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625201652; cv=none; d=google.com; s=arc-20160816; b=s6mR8Xueera6WG4CbnnTs8kf1ZFiRooI0lw6z0H7qickKGWNFDBm3zpGi+7Cmun86R 9vlJUHu/Rog1ukbkMsFzJE2hoI5VEOKIWg4cTlOvQVoZ+puOgwduCUXKrwgb+vcamamd PB7pDppr5uStnXAJpBZ4W/8/3/YeG6XmaH2y6iGTIBW5pLPlmAWcWzSEDN9V2sA7b3zB OO6duJC5cWZsiRn0mc7lVV6YUhrsEWfmxGmBgxVxdjsQ2Syd4RkeQ0UGMXumLxkVToBl QuHNHTuMCsvMUgq2wVkG1xXb5WfI5CivxFTrGNsf+89jTue7Byl5IpYH4YKgXOKWkKeb KWiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=fWa+U9+jriX/wDHCxf0rM9qk+AnP47bTHRgWYkhCvLI=; b=QF61ERPSSnUask3d84MU+ybHc7rVMysyRodWKjvsnMlTIMEvE/Iuaj9ydWBpoGTmxl 7FB+ooLlkTIlK0FgHUVJZ8GSibRCiQFl31sW7SXYmR5ONmzOIoPjmkvc+bdGtUyBNlzy bw7Sn2/0kDuTpgofQ5HLi3x3kYIawIMisQDS1Gu+TbveriUT/WGH40ZrxT4AtWn7jCkP 4JCy0qM/irlq15bsudm20IEe/eyDz97qi1+/yp+037GgD9+Qq6tLkoQGK8+q0X0ZjdqH iBljppqeok+h0pedEOsdBa35j2j3fLsytGuhHVDt0MMo2WY+1JeVhe00UaEe0y33CJMi TKkw== 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si2265913ejx.530.2021.07.01.21.53.48; Thu, 01 Jul 2021 21:54:12 -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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234229AbhGBEyU (ORCPT + 99 others); Fri, 2 Jul 2021 00:54:20 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49545 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233455AbhGBEyT (ORCPT ); Fri, 2 Jul 2021 00:54:19 -0400 Received: from [222.129.38.159] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lzB9S-0005Ri-QI; Fri, 02 Jul 2021 04:51:43 +0000 From: Aaron Ma To: jesse.brandeburg@intel.com, aaron.ma@canonical.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 Subject: [PATCH 2/2] igc: wait for the MAC copy when enabled MAC passthrough Date: Fri, 2 Jul 2021 12:51:20 +0800 Message-Id: <20210702045120.22855-2-aaron.ma@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210702045120.22855-1-aaron.ma@canonical.com> References: <20210702045120.22855-1-aaron.ma@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Such as dock hot plug event when runtime, for hardware implementation, the MAC copy takes less than one second when BIOS enabled MAC passthrough. After test on Lenovo TBT4 dock, 600ms is enough to update the MAC address. Otherwise ethernet fails to work. Signed-off-by: Aaron Ma --- drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 606b72cb6193..c8bc5f089255 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -5468,6 +5468,9 @@ static int igc_probe(struct pci_dev *pdev, memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops)); memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops)); + if (pci_is_thunderbolt_attached(pdev)) + msleep(600); + /* Initialize skew-specific constants */ err = ei->get_invariants(hw); if (err) -- 2.30.2