summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2020-05-20 08:41:22 +0200
committerThorsten Leemhuis <fedora@leemhuis.info>2020-05-20 08:41:22 +0200
commitb9f107e31b70f1b1e7ca68eddc14f42b207fc9f3 (patch)
treea782dda2a5d21ccfd52b1c2a9d0e530be978f0fa
parent5be872526d6dbfe98f02ee19677b50eaa5c3e1e8 (diff)
parent4ff7e4797db7b3415330b8780b18d512849f0d77 (diff)
downloadkernel-b9f107e31b70f1b1e7ca68eddc14f42b207fc9f3.tar.gz
kernel-b9f107e31b70f1b1e7ca68eddc14f42b207fc9f3.tar.xz
kernel-b9f107e31b70f1b1e7ca68eddc14f42b207fc9f3.zip
Merge remote-tracking branch 'origin/f32' into f32-user-thl-vanilla-fedora
-rw-r--r--0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch100
-rw-r--r--0001-xfs-add-agf-freeblocks-verify-in-xfs_agf_verify.patch107
-rw-r--r--RFC-PCI-tegra-Revert-raw_violation_fixup-for-tegra124.patch144
-rw-r--r--arm64-tegra-Fix-ethernet-phy-mode-for-Jetson-Xavier.patch102
-rw-r--r--kernel.spec28
-rw-r--r--tpm-check-event-log-version-before-reading-final-eve.patch81
6 files changed, 562 insertions, 0 deletions
diff --git a/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch b/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
new file mode 100644
index 000000000..f5232e408
--- /dev/null
+++ b/0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
@@ -0,0 +1,100 @@
+From 3666fb55d53fb40f75ec4d665416fed1a714ef09 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 12 May 2020 00:39:24 +0200
+Subject: [PATCH] pwm: lpss: Fix get_state runtime-pm reference handling
+
+Before commit cfc4c189bc70 ("pwm: Read initial hardware state at request
+time"), a driver's get_state callback would get called once per PWM from
+pwmchip_add().
+
+pwm-lpss' runtime-pm code was relying on this, getting a runtime-pm ref for
+PWMs which are enabled at probe time from within its get_state callback,
+before enabling runtime-pm.
+
+The change to calling get_state at request time causes a number of
+problems:
+
+1. PWMs enabled at probe time may get runtime suspended before they are
+requested, causing e.g. a LCD backlight controlled by the PWM to turn off.
+
+2. When the request happens when the PWM has been runtime suspended, the
+ctrl register will read all 1 / 0xffffffff, causing get_state to store
+bogus values in the pwm_state.
+
+3. get_state was using an async pm_runtime_get() call, because it assumed
+that runtime-pm has not been enabled yet. If shortly after the request an
+apply call is made, then the pwm_lpss_is_updating() check may trigger
+because the resume triggered by the pm_runtime_get() call is not complete
+yet, so the ctrl register still reads all 1 / 0xffffffff.
+
+This commit fixes these issues by moving the initial pm_runtime_get() call
+for PWMs which are enabled at probe time to the pwm_lpss_probe() function;
+and by making get_state take a runtime-pm ref before reading the ctrl reg.
+
+BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1828927
+Fixes: cfc4c189bc70 ("pwm: Read initial hardware state at request time")
+Cc: stable@vger.kernel.org
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Upstream Status: https://lore.kernel.org/linux-acpi/5f15f6bc-8650-d86e-893f-0d41557c57c7@redhat.com/
+---
+ drivers/pwm/pwm-lpss.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
+index 75bbfe5f3bc2..9d965ffe66d1 100644
+--- a/drivers/pwm/pwm-lpss.c
++++ b/drivers/pwm/pwm-lpss.c
+@@ -158,7 +158,6 @@ static int pwm_lpss_apply(struct pwm_chip *chip, struct pwm_device *pwm,
+ return 0;
+ }
+
+-/* This function gets called once from pwmchip_add to get the initial state */
+ static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
+ struct pwm_state *state)
+ {
+@@ -167,6 +166,8 @@ static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
+ unsigned long long base_unit, freq, on_time_div;
+ u32 ctrl;
+
++ pm_runtime_get_sync(chip->dev);
++
+ base_unit_range = BIT(lpwm->info->base_unit_bits);
+
+ ctrl = pwm_lpss_read(pwm);
+@@ -187,8 +188,7 @@ static void pwm_lpss_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
+ state->polarity = PWM_POLARITY_NORMAL;
+ state->enabled = !!(ctrl & PWM_ENABLE);
+
+- if (state->enabled)
+- pm_runtime_get(chip->dev);
++ pm_runtime_put(chip->dev);
+ }
+
+ static const struct pwm_ops pwm_lpss_ops = {
+@@ -202,7 +202,8 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
+ {
+ struct pwm_lpss_chip *lpwm;
+ unsigned long c;
+- int ret;
++ int i, ret;
++ u32 ctrl;
+
+ if (WARN_ON(info->npwm > MAX_PWMS))
+ return ERR_PTR(-ENODEV);
+@@ -232,6 +233,12 @@ struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
+ return ERR_PTR(ret);
+ }
+
++ for (i = 0; i < lpwm->info->npwm; i++) {
++ ctrl = pwm_lpss_read(&lpwm->chip.pwms[i]);
++ if (ctrl & PWM_ENABLE)
++ pm_runtime_get(dev);
++ }
++
+ return lpwm;
+ }
+ EXPORT_SYMBOL_GPL(pwm_lpss_probe);
+--
+2.26.2
+
diff --git a/0001-xfs-add-agf-freeblocks-verify-in-xfs_agf_verify.patch b/0001-xfs-add-agf-freeblocks-verify-in-xfs_agf_verify.patch
new file mode 100644
index 000000000..8409a1f30
--- /dev/null
+++ b/0001-xfs-add-agf-freeblocks-verify-in-xfs_agf_verify.patch
@@ -0,0 +1,107 @@
+From d0c7feaf87678371c2c09b3709400be416b2dc62 Mon Sep 17 00:00:00 2001
+From: Zheng Bin <zhengbin13@huawei.com>
+Date: Fri, 21 Feb 2020 07:38:20 -0800
+Subject: [PATCH] xfs: add agf freeblocks verify in xfs_agf_verify
+
+We recently used fuzz(hydra) to test XFS and automatically generate
+tmp.img(XFS v5 format, but some metadata is wrong)
+
+xfs_repair information(just one AG):
+agf_freeblks 0, counted 3224 in ag 0
+agf_longest 536874136, counted 3224 in ag 0
+sb_fdblocks 613, counted 3228
+
+Test as follows:
+mount tmp.img tmpdir
+cp file1M tmpdir
+sync
+
+In 4.19-stable, sync will stuck, the reason is:
+xfs_mountfs
+ xfs_check_summary_counts
+ if ((!xfs_sb_version_haslazysbcount(&mp->m_sb) ||
+ XFS_LAST_UNMOUNT_WAS_CLEAN(mp)) &&
+ !xfs_fs_has_sickness(mp, XFS_SICK_FS_COUNTERS))
+ return 0; -->just return, incore sb_fdblocks still be 613
+ xfs_initialize_perag_data
+
+cp file1M tmpdir -->ok(write file to pagecache)
+sync -->stuck(write pagecache to disk)
+xfs_map_blocks
+ xfs_iomap_write_allocate
+ while (count_fsb != 0) {
+ nimaps = 0;
+ while (nimaps == 0) { --> endless loop
+ nimaps = 1;
+ xfs_bmapi_write(..., &nimaps) --> nimaps becomes 0 again
+xfs_bmapi_write
+ xfs_bmap_alloc
+ xfs_bmap_btalloc
+ xfs_alloc_vextent
+ xfs_alloc_fix_freelist
+ xfs_alloc_space_available -->fail(agf_freeblks is 0)
+
+In linux-next, sync not stuck, cause commit c2b3164320b5 ("xfs:
+use the latest extent at writeback delalloc conversion time") remove
+the above while, dmesg is as follows:
+[ 55.250114] XFS (loop0): page discard on page ffffea0008bc7380, inode 0x1b0c, offset 0.
+
+Users do not know why this page is discard, the better soultion is:
+1. Like xfs_repair, make sure sb_fdblocks is equal to counted
+(xfs_initialize_perag_data did this, who is not called at this mount)
+2. Add agf verify, if fail, will tell users to repair
+
+This patch use the second soultion.
+
+Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
+Signed-off-by: Ren Xudong <renxudong1@huawei.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+---
+ fs/xfs/libxfs/xfs_alloc.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
+index d8053bc96c4d..183dc2587092 100644
+--- a/fs/xfs/libxfs/xfs_alloc.c
++++ b/fs/xfs/libxfs/xfs_alloc.c
+@@ -2858,6 +2858,13 @@ xfs_agf_verify(
+ be32_to_cpu(agf->agf_flcount) <= xfs_agfl_size(mp)))
+ return __this_address;
+
++ if (be32_to_cpu(agf->agf_length) > mp->m_sb.sb_dblocks)
++ return __this_address;
++
++ if (be32_to_cpu(agf->agf_freeblks) < be32_to_cpu(agf->agf_longest) ||
++ be32_to_cpu(agf->agf_freeblks) > be32_to_cpu(agf->agf_length))
++ return __this_address;
++
+ if (be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) < 1 ||
+ be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]) < 1 ||
+ be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]) > XFS_BTREE_MAXLEVELS ||
+@@ -2869,6 +2876,10 @@ xfs_agf_verify(
+ be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]) > XFS_BTREE_MAXLEVELS))
+ return __this_address;
+
++ if (xfs_sb_version_hasrmapbt(&mp->m_sb) &&
++ be32_to_cpu(agf->agf_rmap_blocks) > be32_to_cpu(agf->agf_length))
++ return __this_address;
++
+ /*
+ * during growfs operations, the perag is not fully initialised,
+ * so we can't use it for any useful checking. growfs ensures we can't
+@@ -2882,6 +2893,11 @@ xfs_agf_verify(
+ be32_to_cpu(agf->agf_btreeblks) > be32_to_cpu(agf->agf_length))
+ return __this_address;
+
++ if (xfs_sb_version_hasreflink(&mp->m_sb) &&
++ be32_to_cpu(agf->agf_refcount_blocks) >
++ be32_to_cpu(agf->agf_length))
++ return __this_address;
++
+ if (xfs_sb_version_hasreflink(&mp->m_sb) &&
+ (be32_to_cpu(agf->agf_refcount_level) < 1 ||
+ be32_to_cpu(agf->agf_refcount_level) > XFS_BTREE_MAXLEVELS))
+--
+2.26.2
+
diff --git a/RFC-PCI-tegra-Revert-raw_violation_fixup-for-tegra124.patch b/RFC-PCI-tegra-Revert-raw_violation_fixup-for-tegra124.patch
new file mode 100644
index 000000000..3142df6dc
--- /dev/null
+++ b/RFC-PCI-tegra-Revert-raw_violation_fixup-for-tegra124.patch
@@ -0,0 +1,144 @@
+From patchwork Mon Apr 20 16:43:04 2020
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Nicolas Chauvet <kwizart@gmail.com>
+X-Patchwork-Id: 1273561
+Return-Path: <linux-tegra-owner@vger.kernel.org>
+X-Original-To: incoming@patchwork.ozlabs.org
+Delivered-To: patchwork-incoming@bilbo.ozlabs.org
+Authentication-Results: ozlabs.org;
+ spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
+ (client-ip=23.128.96.18; helo=vger.kernel.org;
+ envelope-from=linux-tegra-owner@vger.kernel.org; receiver=<UNKNOWN>)
+Authentication-Results: ozlabs.org;
+ dmarc=pass (p=none dis=none) header.from=gmail.com
+Authentication-Results: ozlabs.org; dkim=pass (2048-bit key;
+ unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
+ header.s=20161025 header.b=TzeKBoiR; dkim-atps=neutral
+Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
+ by ozlabs.org (Postfix) with ESMTP id 495XZC49yWz9sP7
+ for <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2020 02:43:15 +1000 (AEST)
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1726731AbgDTQnK (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);
+ Mon, 20 Apr 2020 12:43:10 -0400
+Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42314 "EHLO
+ lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL)
+ by vger.kernel.org with ESMTP id S1726693AbgDTQnI (ORCPT
+ <rfc822;linux-tegra@vger.kernel.org>);
+ Mon, 20 Apr 2020 12:43:08 -0400
+Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com
+ [IPv6:2a00:1450:4864:20::342])
+ by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED4CC061A0C;
+ Mon, 20 Apr 2020 09:43:08 -0700 (PDT)
+Received: by mail-wm1-x342.google.com with SMTP id x25so280061wmc.0;
+ Mon, 20 Apr 2020 09:43:08 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
+ h=from:to:cc:subject:date:message-id:mime-version
+ :content-transfer-encoding;
+ bh=IHuj1FiuJPknu8Z7Uq/JeXw8aSg2xFkcoVYT3QRT6dA=;
+ b=TzeKBoiR2hu1L+OGuVzAMrvuOnCDM+J1nsGD1QbB9tkwdgx5rUc3jCkTzkFKQpJZ+g
+ jx96zAcsJH7FSzAMjcpWTgiixmPWJj0xuWXML6IW4oVt5Npm6F2D8UyjZyfgnUKcGU/k
+ Ye+bmwRUMi6cBC1Jpn93V5znfun/KPJFuOi1qLjh4g9rRAQWp4o4mZYTnxBkkMhi63gU
+ V7L+RQlj4buS+IXOZ/xi5chAd/gFJkADDOm8HVDAcIG6pEUCkXciuRiNL3f81ss3nwjq
+ uQQg7uRc8wXqOP1IqZ+W8kYP25Bty+uiykVyhv6XfOg0vWk4GK+wnM0wcP7boPe8Y8sS
+ dTLg==
+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:mime-version
+ :content-transfer-encoding;
+ bh=IHuj1FiuJPknu8Z7Uq/JeXw8aSg2xFkcoVYT3QRT6dA=;
+ b=YcZCjbicKhCKe1SzKhwIcD9gZI/8J/QS/LQk4lcoLCwcSjlg9p0O/m5t80TGXT4lcn
+ wFh0VyY+SsMR6uXCPrN8QXYbEY6fFVxEY2+btKzt+ft0v4jQUljopKGOV6n85FRs89U4
+ DrjNPXoL7izbuheb/tW9ZBrrMTLQ1btIJ/MiAZ2gKtlrachezXQjW1Gtn66/hEpIQybL
+ 9ctDGvygIAju/Yd9fx+cakfzPUGzKTc/yOhjKjbMfxF6YxTbdqPc08+0a3cOYoSoRKLE
+ i/drXsQpQhJHOhzZWXinld37vEHc/1pa/HYv3QR+UAproGfZq4eGqBh6cIYY87fW7nHk
+ lsmg==
+X-Gm-Message-State: AGi0PuYqEn+eRXnjHmfYwoSYQUy0ZK+SX7Vpbgu/XErfwPhXok1ZAmWe
+ N87IAyxXhJOQCMJxw6TgfSo=
+X-Google-Smtp-Source: APiQypLsj3XpHj4CyxtmOjlqdZs3DB8oJEEo2ghhT6QywH/SywA9LShfe1OCbQ3t6MmEGWRd+WIiVw==
+X-Received: by 2002:a1c:41d7:: with SMTP id o206mr194590wma.89.1587400987185;
+ Mon, 20 Apr 2020 09:43:07 -0700 (PDT)
+Received: from arrakis.kwizart.net (lfbn-nic-1-185-211.w2-15.abo.wanadoo.fr.
+ [2.15.34.211])
+ by smtp.gmail.com with ESMTPSA id l4sm47922wrv.60.2020.04.20.09.43.05
+ (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
+ Mon, 20 Apr 2020 09:43:06 -0700 (PDT)
+From: Nicolas Chauvet <kwizart@gmail.com>
+To: Manikanta Maddireddy <mmaddireddy@nvidia.com>,
+ Thierry Reding <thierry.reding@gmail.com>,
+ Jonathan Hunter <jonathanh@nvidia.com>
+Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
+ linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org,
+ Nicolas Chauvet <kwizart@gmail.com>
+Subject: [RFC] PCI: tegra: Revert raw_violation_fixup for tegra124
+Date: Mon, 20 Apr 2020 18:43:04 +0200
+Message-Id: <20200420164304.28810-1-kwizart@gmail.com>
+X-Mailer: git-send-email 2.25.2
+MIME-Version: 1.0
+Sender: linux-tegra-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-tegra.vger.kernel.org>
+X-Mailing-List: linux-tegra@vger.kernel.org
+
+As reported in https://bugzilla.kernel.org/206217 , raw_violation_fixup
+is causing more harm than good in some common use-cases.
+
+This patch as RFC is a partial revert of the 191cd6fb5 commit:
+ "PCI: tegra: Add SW fixup for RAW violations"
+that was first introduced in 5.3 kernel.
+This fix the following regression since then.
+
+
+When using both the network NIC and I/O on MMC this can lead to the
+following message on jetson-tk1:
+
+ NETDEV WATCHDOG: enp1s0 (r8169): transmit queue 0 timed out
+
+and
+
+ pcieport 0000:00:02.0: AER: Uncorrected (Non-Fatal) error received: 0000:01:00.0
+ r8169 0000:01:00.0: AER: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
+ r8169 0000:01:00.0: AER: device [10ec:8168] error status/mask=00004000/00400000
+ r8169 0000:01:00.0: AER: [14] CmpltTO (First)
+ r8169 0000:01:00.0: AER: can't recover (no error_detected callback)
+ pcieport 0000:00:02.0: AER: device recovery failed
+
+
+After that, the ethernet NIC isn't functional anymore even after reloading
+the module.
+After a reboot, this is reproducible by copying a large file over the
+ethernet NIC to the MMC.
+For some reasons this cannot be reproduced when the same file is copied
+to a tmpfs.
+
+
+This patch is RFC because it requires more understanding from Nvidia.
+ - Is the fixup (available in l4t downstrem) still needed for upstream ?
+ - Is there a need to update the fixup values for upstream ?
+ - If the fixup is reverted, does the hw bug can still be seen with
+ upstream ?
+
+Others can also provides more understanding:
+ - Conditions to reproduce the bug (or not)...
+
+
+Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
+Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
+---
+ drivers/pci/controller/pci-tegra.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
+index 3e64ba6a36a8..4027e074094a 100644
+--- a/drivers/pci/controller/pci-tegra.c
++++ b/drivers/pci/controller/pci-tegra.c
+@@ -2470,7 +2470,7 @@ static const struct tegra_pcie_soc tegra124_pcie = {
+ .program_uphy = true,
+ .update_clamp_threshold = true,
+ .program_deskew_time = false,
+- .raw_violation_fixup = true,
++ .raw_violation_fixup = false,
+ .update_fc_timer = false,
+ .has_cache_bars = false,
+ .ectl.enable = false,
diff --git a/arm64-tegra-Fix-ethernet-phy-mode-for-Jetson-Xavier.patch b/arm64-tegra-Fix-ethernet-phy-mode-for-Jetson-Xavier.patch
new file mode 100644
index 000000000..860d64763
--- /dev/null
+++ b/arm64-tegra-Fix-ethernet-phy-mode-for-Jetson-Xavier.patch
@@ -0,0 +1,102 @@
+From patchwork Fri May 1 07:27:56 2020
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Jon Hunter <jonathanh@nvidia.com>
+X-Patchwork-Id: 1281134
+Return-Path: <linux-tegra-owner@vger.kernel.org>
+X-Original-To: incoming@patchwork.ozlabs.org
+Delivered-To: patchwork-incoming@bilbo.ozlabs.org
+Authentication-Results: ozlabs.org;
+ spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
+ (client-ip=23.128.96.18; helo=vger.kernel.org;
+ envelope-from=linux-tegra-owner@vger.kernel.org; receiver=<UNKNOWN>)
+Authentication-Results: ozlabs.org;
+ dmarc=pass (p=none dis=none) header.from=nvidia.com
+Authentication-Results: ozlabs.org; dkim=pass (2048-bit key;
+ unprotected) header.d=nvidia.com header.i=@nvidia.com header.a=rsa-sha256
+ header.s=n1 header.b=jaB3BsED; dkim-atps=neutral
+Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
+ by ozlabs.org (Postfix) with ESMTP id 49D3l15Pl7z9sTP
+ for <incoming@patchwork.ozlabs.org>; Fri, 1 May 2020 17:28:29 +1000 (AEST)
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1728212AbgEAH20 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);
+ Fri, 1 May 2020 03:28:26 -0400
+Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:1347 "EHLO
+ hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1726452AbgEAH20 (ORCPT
+ <rfc822;linux-tegra@vger.kernel.org>); Fri, 1 May 2020 03:28:26 -0400
+Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by
+ hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA)
+ id <B5eabcf8d0000>; Fri, 01 May 2020 00:28:13 -0700
+Received: from hqmail.nvidia.com ([172.20.161.6])
+ by hqpgpgate101.nvidia.com (PGP Universal service);
+ Fri, 01 May 2020 00:28:25 -0700
+X-PGP-Universal: processed;
+ by hqpgpgate101.nvidia.com on Fri, 01 May 2020 00:28:25 -0700
+Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com
+ (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 1 May
+ 2020 07:28:25 +0000
+Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL109.nvidia.com
+ (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend
+ Transport; Fri, 1 May 2020 07:28:25 +0000
+Received: from moonraker.nvidia.com (Not Verified[10.26.73.165]) by
+ hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121)
+ id <B5eabcf980000>; Fri, 01 May 2020 00:28:25 -0700
+From: Jon Hunter <jonathanh@nvidia.com>
+To: Thierry Reding <thierry.reding@gmail.com>
+CC: <devicetree@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
+ Peter Robinson <pbrobinson@redhat.com>,
+ Jon Hunter <jonathanh@nvidia.com>, <stable@vger.kernel.org>
+Subject: [PATCH] arm64: tegra: Fix ethernet phy-mode for Jetson Xavier
+Date: Fri, 1 May 2020 08:27:56 +0100
+Message-ID: <20200501072756.25348-1-jonathanh@nvidia.com>
+X-Mailer: git-send-email 2.17.1
+X-NVConfidentiality: public
+MIME-Version: 1.0
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;
+ t=1588318093; bh=d+dYuOUYYG3jFlbXdN72xXUr16sgw2ePdUeUPoMzbSo=;
+ h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer:
+ X-NVConfidentiality:MIME-Version:Content-Type;
+ b=jaB3BsEDf3Fc0WN6kwJrPRalITORiFw8jh6J6ICTotAIsVMyxupddkxZxvK2bpOpK
+ dw771EHWsja2buZgJ1YGA4ZmleyqFnlXDrl/r6f/yyEoBYvTDJEBlggHz1zyZ2cCSe
+ AemmvCRR7KOLMYq9AUpQSVz5u8zuQVezob0pIQjVZRZ1FxjXbiDILaI5mFrAnRzpg9
+ IxzEPnPtX6nAMz/IM5oCiUpUCSRwSLtIQtyvQMeOgCbeINMsGMg3AuPYxohlF1QqkZ
+ fRZWpiuhT4RclVX+ga7roOMUpumX0hmQPA61LmkPwdd373pOsGjBOPZWwZ9GCoq1mT
+ EXSJdwyKZLJvQ==
+Sender: linux-tegra-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-tegra.vger.kernel.org>
+X-Mailing-List: linux-tegra@vger.kernel.org
+
+The 'phy-mode' property is currently defined as 'rgmii' for Jetson
+Xavier. This indicates that the RGMII RX and TX delays are set by the
+MAC and the internal delays set by the PHY are not used.
+
+If the Marvell PHY driver is enabled, such that it is used and not the
+generic PHY, ethernet failures are seen (DHCP is failing to obtain an
+IP address) and this is caused because the Marvell PHY driver is
+disabling the internal RX and TX delays. For Jetson Xavier the internal
+PHY RX and TX delay should be used and so fix this by setting the
+'phy-mode' to 'rgmii-id' and not 'rgmii'.
+
+Cc: stable@vger.kernel.org
+
+Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
+---
+ arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
+index 623f7d7d216b..8e3136dfdd62 100644
+--- a/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
++++ b/arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi
+@@ -33,7 +33,7 @@
+
+ phy-reset-gpios = <&gpio TEGRA194_MAIN_GPIO(G, 5) GPIO_ACTIVE_LOW>;
+ phy-handle = <&phy>;
+- phy-mode = "rgmii";
++ phy-mode = "rgmii-id";
+
+ mdio {
+ #address-cells = <1>;
diff --git a/kernel.spec b/kernel.spec
index d0d200ffe..5fc7a79ba 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -868,6 +868,8 @@ Patch325: backlight-lp855x-Ensure-regulators-are-disabled-on-probe-failure.patch
Patch326: arm64-drm-tegra-Fix-SMMU-support-on-Tegra124-and-Tegra210.patch
# http://patchwork.ozlabs.org/patch/1221384/
Patch327: PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch
+# https://patchwork.ozlabs.org/patch/1281134/
+Patch328: arm64-tegra-Fix-ethernet-phy-mode-for-Jetson-Xavier.patch
# Coral
Patch330: arm64-dts-imx8mq-phanbell-Add-support-for-ethernet.patch
@@ -928,6 +930,18 @@ Patch512: drm-dp_mst-Fix-drm_dp_send_dpcd_write-return-code.patch
# CVE-2020-10711 rhbz 1825116 1834778
Patch513: net-netlabel-cope-with-NULL-catmap.patch
+#rhbz 1779611
+Patch514: tpm-check-event-log-version-before-reading-final-eve.patch
+
+# CVE-2020-12655 rhbz 1832543 1832545
+Patch515: 0001-xfs-add-agf-freeblocks-verify-in-xfs_agf_verify.patch
+
+# rhbz 1828927 No backlight control on CHT devices, patch posted upstream
+Patch516: 0001-pwm-lpss-Fix-get_state-runtime-pm-reference-handling.patch
+
+# kernel.org bz 206217
+Patch517: RFC-PCI-tegra-Revert-raw_violation_fixup-for-tegra124.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -3027,6 +3041,20 @@ fi
#
#
%changelog
+* Mon May 18 2020 Justin M. Forbes <jforbes@fedoraproject.org>
+- Fix stability issue with the jetson-tk1 NIC
+
+* Mon May 18 2020 Hans de Goede <hdegoede@redhat.com>
+- Add patch fixing backlight control on Cherry Trail devices (rhbz 1828927)
+
+* Thu May 14 2020 Justin M. Forbes <jforbes@fedoraproject.org> - 5.6.13-300
+- Linux v5.6.13
+- Fix boot hang caused by buggy TPM support (rhbz 1779611)
+- Fix CVE-2020-12655 (rhbz 1832543 1832545)
+
+* Thu May 14 2020 Peter Robinson <pbrobinson@fedoraproject.org>
+- Fix for NIC issues on Jetson Xavier AGX
+
* Tue May 12 2020 Justin M. Forbes <jforbes@fedoraproject.org>
- Fix CVE-2020-10711 (rhbz 1825116 1834778)
diff --git a/tpm-check-event-log-version-before-reading-final-eve.patch b/tpm-check-event-log-version-before-reading-final-eve.patch
new file mode 100644
index 000000000..9668c807b
--- /dev/null
+++ b/tpm-check-event-log-version-before-reading-final-eve.patch
@@ -0,0 +1,81 @@
+From MAILER-DAEMON Thu May 14 17:38:32 2020
+From: Loïc Yhuel <loic.yhuel@gmail.com>
+To: linux-integrity@vger.kernel.org
+Cc: matthewgarrett@google.com, ardb@kernel.org, jarkko.sakkinen@linux.intel.com, javierm@redhat.com, Loïc Yhuel <loic.yhuel@gmail.com>
+Subject: [PATCH] tpm: check event log version before reading final events
+Date: Tue, 12 May 2020 06:01:13 +0200
+Message-Id: <20200512040113.277768-1-loic.yhuel@gmail.com>
+Sender: linux-integrity-owner@vger.kernel.org
+List-ID: <linux-integrity.vger.kernel.org>
+X-Mailing-List: linux-integrity@vger.kernel.org
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+This fixes the boot issues since 5.3 on several Dell models when the TPM
+is enabled. Depending on the exact grub binary, booting the kernel would
+freeze early, or just report an error parsing the final events log.
+
+We get an event log in the SHA-1 format, which doesn't have a
+tcg_efi_specid_event_head in the first event, and there is a final events
+table which doesn't match the crypto agile format.
+__calc_tpm2_event_size reads bad "count" and "efispecid->num_algs", and
+either fails, or loops long enough for the machine to be appear frozen.
+
+So we now only parse the final events table, which is per the spec always
+supposed to be in the crypto agile format, when we got a event log in this
+format.
+
+Fixes: 166a2809d65b2 ("tpm: Don't duplicate events from the final event log in the TCG2 log")
+Fixes: c46f3405692de ("tpm: Reserve the TPM final events table")
+Signed-off-by: Loïc Yhuel <loic.yhuel@gmail.com>
+Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
+Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
+Reviewed-by: Matthew Garrett <mjg59@google.com>
+Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1779611
+---
+ drivers/firmware/efi/libstub/tpm.c | 5 +++--
+ drivers/firmware/efi/tpm.c | 3 ++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c
+index 1d59e103a2e3..e9a684637b70 100644
+--- a/drivers/firmware/efi/libstub/tpm.c
++++ b/drivers/firmware/efi/libstub/tpm.c
+@@ -54,7 +54,7 @@ void efi_retrieve_tpm2_eventlog(void)
+ efi_status_t status;
+ efi_physical_addr_t log_location = 0, log_last_entry = 0;
+ struct linux_efi_tpm_eventlog *log_tbl = NULL;
+- struct efi_tcg2_final_events_table *final_events_table;
++ struct efi_tcg2_final_events_table *final_events_table = NULL;
+ unsigned long first_entry_addr, last_entry_addr;
+ size_t log_size, last_entry_size;
+ efi_bool_t truncated;
+@@ -127,7 +127,8 @@ void efi_retrieve_tpm2_eventlog(void)
+ * Figure out whether any events have already been logged to the
+ * final events structure, and if so how much space they take up
+ */
+- final_events_table = get_efi_config_table(LINUX_EFI_TPM_FINAL_LOG_GUID);
++ if (version == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2)
++ final_events_table = get_efi_config_table(LINUX_EFI_TPM_FINAL_LOG_GUID);
+ if (final_events_table && final_events_table->nr_events) {
+ struct tcg_pcr_event2_head *header;
+ int offset;
+diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c
+index 55b031d2c989..77e101a395e7 100644
+--- a/drivers/firmware/efi/tpm.c
++++ b/drivers/firmware/efi/tpm.c
+@@ -62,7 +62,8 @@ int __init efi_tpm_eventlog_init(void)
+ tbl_size = sizeof(*log_tbl) + log_tbl->size;
+ memblock_reserve(efi.tpm_log, tbl_size);
+
+- if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR)
++ if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR ||
++ log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2)
+ goto out;
+
+ final_tbl = early_memremap(efi.tpm_final_log, sizeof(*final_tbl));
+--
+2.26.2
+
+