From patchwork Wed Sep 8 08:49:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Ma X-Patchwork-Id: 1525694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=BMPQGKdK; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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 ozlabs.org (Postfix) with ESMTPS id 4H4G6q4w5bz9t9b; Wed, 8 Sep 2021 18:50:11 +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 1mNtHT-0001Xe-PT; Wed, 08 Sep 2021 08:50:07 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mNtHT-0001XS-0y for kernel-team@lists.ubuntu.com; Wed, 08 Sep 2021 08:50:07 +0000 Received: from localhost.localdomain (unknown [222.129.32.23]) (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-1.canonical.com (Postfix) with ESMTPSA id 9755A3F325 for ; Wed, 8 Sep 2021 08:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1631091006; bh=zAFwBLQX8moySL5fuFallDB41zz9oug/4tsbR01vgWY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BMPQGKdK530YvJq9bdWg29Zk8WvYbZtF45TvhG9exQDbEcn79VrtOB+tpYEEKs6Ar BRbxoWoBMd1VXnkGn/duT4SY2bNiNAdZGDLcrzCKJHtpoLawgk1xmA5N1M02braRN4 67iEjOo7g7a4xVVoTlkR8RWU6bX4Uma0FSpKPhmVGAItYrH5Fu9ZMbNLkV5ktz1uBS 2W6D/O69N+wdVKY6McJPeAa206AugN7zciTDriT+8Qh8lnS9lwz5fnaxi3wISBb9/i r3GB8Hu4j/tYitEcKj55nKpC1wuIA39urylnHbmjfIhBqObGsiZZLbD6tvdKCpcQew ell/aspuB8pFQ== From: Aaron Ma To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][H/OEM-5.13/OEM-5.14/U] UBUNTU: SAUCE: igc: wait for the MAC copy when enabled MAC passthrough Date: Wed, 8 Sep 2021 16:49:52 +0800 Message-Id: <20210908084952.41486-2-aaron.ma@canonical.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210908084952.41486-1-aaron.ma@canonical.com> References: <20210908084952.41486-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 51be5b9b07bd..512739f20cad 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -5088,6 +5088,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)