From patchwork Wed Aug 3 07:55:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Ma X-Patchwork-Id: 1663237 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=qQ7GRrnF; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LyPLj3mj3z9sFs for ; Wed, 3 Aug 2022 17:56:12 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oJ9EY-0006Us-RW; Wed, 03 Aug 2022 07:56:02 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oJ9EX-0006UO-Mb for kernel-team@lists.ubuntu.com; Wed, 03 Aug 2022 07:56:01 +0000 Received: from localhost.localdomain (unknown [222.129.34.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 8A7903F11C for ; Wed, 3 Aug 2022 07:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659513361; bh=bIPIA/CFWxaNYwdbNttHYf6NcKcAv5CjpVvGG6p/8Os=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qQ7GRrnFEAWsMbZlSKryesmBHlvA276gKFov7z286RlRphzHvuFOY9xXrSCUdaPhw cNtcgoWfOZwFgiZa4Tk0dE0nUu17jWW8fzxVhe8yAo2osQFUio1blO1Ie97TB1b3FK S9e4monjaPzybLOrsBr+YlcSLuTJqf3zBae6e7Is1FYCLPekKud2TTeP9dLthNN3n6 JeKtWA59c0ievFQJ+4cUMmdQnP4C/6/0rU3oudTQ7L5jAql6Htp+Lpr22XrZn7E/mA MqOhePBrWrix6htfjigmkHffQ11JXVV+WQr7DqjNOKz1cTpAN+Pmshqtde3e5cIJM6 RPTWPopo+Ud7Q== From: Aaron Ma To: kernel-team@lists.ubuntu.com Subject: [J/OEM-5.17/U][PATCH 1/1] UBUNTU: SAUCE: igc: wait for the MAC copy when enabled MAC passthrough Date: Wed, 3 Aug 2022 15:55:53 +0800 Message-Id: <20220803075553.884839-2-aaron.ma@canonical.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220803075553.884839-1-aaron.ma@canonical.com> References: <20220803075553.884839-1-aaron.ma@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1942999 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. Link: https://lore.kernel.org/lkml/20210702045120.22855-2-aaron.ma@canonical.com/ 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 f99819fc559d9..634cfdc203203 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -6323,6 +6323,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)