From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=EJjFygZS; spf=pass (domain: linaro.org, ip: 209.85.214.196, mailfrom: masahisa.kojima@linaro.org) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by groups.io with SMTP; Wed, 24 Jul 2019 18:11:08 -0700 Received: by mail-pl1-f196.google.com with SMTP id b7so22716145pls.6 for ; Wed, 24 Jul 2019 18:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qVHzJ5hZP+z1V/cW1QtE3wsX+O0lWpRa26PM+099JlY=; b=EJjFygZSeyrM8bpKSBJmpyHZUPigrdEwA2f4PAijKzaQcB/Y8qExcZElq6blpC/l5N LsLmMFRpeekt+vdt5YBgjZW8NgLy9qHGFf8wijx8Z76w16FyO1JIBcqbVu9YvJNqchiw nsH+Lm4R6htI1KuFbJBKAkz2opNUhVBep5eUeO6d9P9tbiT6d5H529bm/JWOGiPIErUa SSO5PHX/5b6pa+2IfBebi+ASp9EXwRKuXe4XRdPZXRsaZmLlGzHgAgqQygXi/EFPiXza SbU+VnjGfwU2Ocg2sgKeXaebv8Gpq3eZpTYkuW0GSrXNk0MVPDbmD7b5WfMDWUEcuy+L /jOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qVHzJ5hZP+z1V/cW1QtE3wsX+O0lWpRa26PM+099JlY=; b=LV7vYNYreL/gubyTWeZilhnpJTdQ0j5uaEzG3nt7YpCa3adSmyp5WO7NlyUNsAQ73n i6ia9kKhXwx5QJ0c2voxwpVuH81acgs8tdg/xTTTZxTZyxRcjbt+YN7NbsbOS3qZokra OvTlUASSUS3bN7D62bONuxiII8Ap1skW2oBn7lnAkHHkhJqvZOHsgvxJOVWRoBd8eZlQ g4ThgIpIixgG8ySRilTBGsCM5aTKuoG2fISErnC1j0zlzuUqUvRkna1XHR3Sg8jr+m3Y 9iuIyzXGB8Oi082PSma1Zg3igdt8/UuUfIKB4A/VXZKuYC/LhPB5muSD8UdnBIO0HJtV hg8Q== X-Gm-Message-State: APjAAAX7ne45NTtSSbjWiwEhK8L3hHlq6AkqVYQrkbuLWHQGpzkyba/n MAjKgvHMNhSQph0aOAO8e2WA7vs1Jj0= X-Google-Smtp-Source: APXvYqxbxSiDwZbVfonVDI7pfxZ7B7r9YKJ97zdZnqghzR8cK2+5PscLtb/wnZf+a9Uy3tEJKAgz3A== X-Received: by 2002:a17:902:543:: with SMTP id 61mr88315843plf.20.1564017068141; Wed, 24 Jul 2019 18:11:08 -0700 (PDT) Return-Path: Received: from localhost ([121.95.100.191]) by smtp.gmail.com with ESMTPSA id d2sm43639767pjs.21.2019.07.24.18.11.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jul 2019 18:11:07 -0700 (PDT) From: "Masahisa Kojima" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, okamoto.satoru@socionext.com, Masahisa Kojima Subject: [PATCH edk2-platforms v2 0/3] Robust Netsec Initialiation Date: Thu, 25 Jul 2019 10:10:57 +0900 Message-Id: <20190725011100.10176-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 This patch series is bugfix for the hang-up issue in Netsec driver. Some linux distributions such as Ubuntu power down the ethernet phy in reboot. In this case, Netsec initialization fails and system hungs. This patch series add the robust netsec initialization, set ethernet phy as loopback mode to expect stable RXCLK, and wait for media link up. The disadvantage of this patch series is that user has to wait several seconds until netsec driver gives up ethernet link-up if the ethernet cable is not connected. Changes since v1: - modified wrong indent - updated order of new parameter - updated comment - removed unrelated whitespace changes Masahisa Kojima (3): NetsecDxe: embed phy address into NETSEC SDK internal structure NetsecDxe: put phy in loopback mode to guarantee stable RXCLK input NetsecDxe: SnpInitialize() waits for media linking up .../Socionext/DeveloperBox/DeveloperBox.dsc | 1 + .../Drivers/Net/NetsecDxe/NetsecDxe.c | 236 ++++++++---------- .../Drivers/Net/NetsecDxe/NetsecDxe.dec | 1 + .../Drivers/Net/NetsecDxe/NetsecDxe.h | 2 - .../Drivers/Net/NetsecDxe/NetsecDxe.inf | 1 + .../netsec_sdk/include/ogma_api.h | 6 +- .../netsec_sdk/src/ogma_gmac_access.c | 61 ++--- .../netsec_sdk/src/ogma_internal.h | 2 + .../netsec_sdk/src/ogma_misc.c | 80 +++++- .../netsec_for_uefi/netsec_sdk/src/ogma_reg.h | 4 + 10 files changed, 212 insertions(+), 182 deletions(-) -- 2.17.1