]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Feb 2022 13:22:25 +0000 (14:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Feb 2022 13:22:25 +0000 (14:22 +0100)
added patches:
e1000e-separate-adp-board-type-from-tgp.patch
rtc-cmos-evaluate-century-appropriate.patch

queue-5.16/e1000e-separate-adp-board-type-from-tgp.patch [new file with mode: 0644]
queue-5.16/rtc-cmos-evaluate-century-appropriate.patch [new file with mode: 0644]
queue-5.16/series

diff --git a/queue-5.16/e1000e-separate-adp-board-type-from-tgp.patch b/queue-5.16/e1000e-separate-adp-board-type-from-tgp.patch
new file mode 100644 (file)
index 0000000..f875dfa
--- /dev/null
@@ -0,0 +1,120 @@
+From 68defd528f94ed1cf11f49a75cc1875dccd781fa Mon Sep 17 00:00:00 2001
+From: Sasha Neftin <sasha.neftin@intel.com>
+Date: Tue, 7 Dec 2021 13:23:06 +0200
+Subject: e1000e: Separate ADP board type from TGP
+
+From: Sasha Neftin <sasha.neftin@intel.com>
+
+commit 68defd528f94ed1cf11f49a75cc1875dccd781fa upstream.
+
+We have the same LAN controller on different PCH's. Separate ADP board
+type from a TGP which will allow for specific fixes to be applied for
+ADP platforms.
+
+Suggested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
+Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
+Tested-by: Nechama Kraus <nechamax.kraus@linux.intel.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/e1000e/e1000.h   |    4 ++-
+ drivers/net/ethernet/intel/e1000e/ich8lan.c |   20 ++++++++++++++++
+ drivers/net/ethernet/intel/e1000e/netdev.c  |   33 ++++++++++++++--------------
+ 3 files changed, 40 insertions(+), 17 deletions(-)
+
+--- a/drivers/net/ethernet/intel/e1000e/e1000.h
++++ b/drivers/net/ethernet/intel/e1000e/e1000.h
+@@ -115,7 +115,8 @@ enum e1000_boards {
+       board_pch_lpt,
+       board_pch_spt,
+       board_pch_cnp,
+-      board_pch_tgp
++      board_pch_tgp,
++      board_pch_adp
+ };
+ struct e1000_ps_page {
+@@ -502,6 +503,7 @@ extern const struct e1000_info e1000_pch
+ extern const struct e1000_info e1000_pch_spt_info;
+ extern const struct e1000_info e1000_pch_cnp_info;
+ extern const struct e1000_info e1000_pch_tgp_info;
++extern const struct e1000_info e1000_pch_adp_info;
+ extern const struct e1000_info e1000_es2_info;
+ void e1000e_ptp_init(struct e1000_adapter *adapter);
+--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
++++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
+@@ -6021,3 +6021,23 @@ const struct e1000_info e1000_pch_tgp_in
+       .phy_ops                = &ich8_phy_ops,
+       .nvm_ops                = &spt_nvm_ops,
+ };
++
++const struct e1000_info e1000_pch_adp_info = {
++      .mac                    = e1000_pch_adp,
++      .flags                  = FLAG_IS_ICH
++                                | FLAG_HAS_WOL
++                                | FLAG_HAS_HW_TIMESTAMP
++                                | FLAG_HAS_CTRLEXT_ON_LOAD
++                                | FLAG_HAS_AMT
++                                | FLAG_HAS_FLASH
++                                | FLAG_HAS_JUMBO_FRAMES
++                                | FLAG_APME_IN_WUC,
++      .flags2                 = FLAG2_HAS_PHY_STATS
++                                | FLAG2_HAS_EEE,
++      .pba                    = 26,
++      .max_hw_frame_size      = 9022,
++      .get_variants           = e1000_get_variants_ich8lan,
++      .mac_ops                = &ich8_mac_ops,
++      .phy_ops                = &ich8_phy_ops,
++      .nvm_ops                = &spt_nvm_ops,
++};
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c
++++ b/drivers/net/ethernet/intel/e1000e/netdev.c
+@@ -52,6 +52,7 @@ static const struct e1000_info *e1000_in
+       [board_pch_spt]         = &e1000_pch_spt_info,
+       [board_pch_cnp]         = &e1000_pch_cnp_info,
+       [board_pch_tgp]         = &e1000_pch_tgp_info,
++      [board_pch_adp]         = &e1000_pch_adp_info,
+ };
+ struct e1000_reg_info {
+@@ -7904,22 +7905,22 @@ static const struct pci_device_id e1000_
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14), board_pch_tgp },
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15), board_pch_tgp },
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V19), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_tgp },
+-      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_tgp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V19), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_adp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_adp },
+       { 0, 0, 0, 0, 0, 0, 0 } /* terminate list */
+ };
diff --git a/queue-5.16/rtc-cmos-evaluate-century-appropriate.patch b/queue-5.16/rtc-cmos-evaluate-century-appropriate.patch
new file mode 100644 (file)
index 0000000..4837368
--- /dev/null
@@ -0,0 +1,46 @@
+From ff164ae39b82ee483b24579c8e22a13a8ce5bd04 Mon Sep 17 00:00:00 2001
+From: Riwen Lu <luriwen@kylinos.cn>
+Date: Thu, 6 Jan 2022 16:46:09 +0800
+Subject: rtc: cmos: Evaluate century appropriate
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Riwen Lu <luriwen@kylinos.cn>
+
+commit ff164ae39b82ee483b24579c8e22a13a8ce5bd04 upstream.
+
+There's limiting the year to 2069. When setting the rtc year to 2070,
+reading it returns 1970. Evaluate century starting from 19 to count the
+correct year.
+
+$ sudo date -s 20700106
+Mon 06 Jan 2070 12:00:00 AM CST
+$ sudo hwclock -w
+$ sudo hwclock -r
+1970-01-06 12:00:49.604968+08:00
+
+Fixes: 2a4daadd4d3e5071 ("rtc: cmos: ignore bogus century byte")
+
+Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
+Acked-by: Eric Wong <e@80x24.org>
+Reviewed-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Link: https://lore.kernel.org/r/20220106084609.1223688-1-luriwen@kylinos.cn
+Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl> # preparation for stable
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/rtc/rtc-mc146818-lib.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/rtc/rtc-mc146818-lib.c
++++ b/drivers/rtc/rtc-mc146818-lib.c
+@@ -104,7 +104,7 @@ again:
+       time->tm_year += real_year - 72;
+ #endif
+-      if (century > 20)
++      if (century > 19)
+               time->tm_year += (century - 19) * 100;
+       /*
index 98f029fe7415f39117319d867a5608cdbd01c5d7..fe3c283f8370bf7e524641f7dbc14c18a7128407 100644 (file)
@@ -102,3 +102,5 @@ bpf-use-vm_map-instead-of-vm_alloc-for-ringbuf.patch
 selftests-exec-remove-pipe-from-test_gen_files.patch
 selftests-futex-use-variable-make-instead-of-make.patch
 tools-resolve_btfids-do-not-print-any-commands-when-building-silently.patch
+e1000e-separate-adp-board-type-from-tgp.patch
+rtc-cmos-evaluate-century-appropriate.patch