]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 14:45:18 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 14:45:18 +0000 (16:45 +0200)
added patches:
dsa-allow-forwarding-of-redirected-igmp-traffic.patch
e1000e-add-support-for-comet-lake.patch
gfs2-initialize-transaction-tr_ailx_lists-earlier.patch

queue-5.4/dsa-allow-forwarding-of-redirected-igmp-traffic.patch [new file with mode: 0644]
queue-5.4/e1000e-add-support-for-comet-lake.patch [new file with mode: 0644]
queue-5.4/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch [new file with mode: 0644]
queue-5.4/series [new file with mode: 0644]

diff --git a/queue-5.4/dsa-allow-forwarding-of-redirected-igmp-traffic.patch b/queue-5.4/dsa-allow-forwarding-of-redirected-igmp-traffic.patch
new file mode 100644 (file)
index 0000000..60e9f1c
--- /dev/null
@@ -0,0 +1,113 @@
+From 1ed9ec9b08addbd8d3e36d5f4a652d8590a6ddb7 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <daniel@zonque.org>
+Date: Sat, 20 Jun 2020 21:39:25 +0200
+Subject: dsa: Allow forwarding of redirected IGMP traffic
+
+From: Daniel Mack <daniel@zonque.org>
+
+commit 1ed9ec9b08addbd8d3e36d5f4a652d8590a6ddb7 upstream.
+
+The driver for Marvell switches puts all ports in IGMP snooping mode
+which results in all IGMP/MLD frames that ingress on the ports to be
+forwarded to the CPU only.
+
+The bridge code in the kernel can then interpret these frames and act
+upon them, for instance by updating the mdb in the switch to reflect
+multicast memberships of stations connected to the ports. However,
+the IGMP/MLD frames must then also be forwarded to other ports of the
+bridge so external IGMP queriers can track membership reports, and
+external multicast clients can receive query reports from foreign IGMP
+queriers.
+
+Currently, this is impossible as the EDSA tagger sets offload_fwd_mark
+on the skb when it unwraps the tagged frames, and that will make the
+switchdev layer prevent the skb from egressing on any other port of
+the same switch.
+
+To fix that, look at the To_CPU code in the DSA header and make
+forwarding of the frame possible for trapped IGMP packets.
+
+Introduce some #defines for the frame types to make the code a bit more
+comprehensive.
+
+This was tested on a Marvell 88E6352 variant.
+
+Signed-off-by: Daniel Mack <daniel@zonque.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Tested-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: DENG Qingfang <dqfext@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/dsa/tag_edsa.c |   37 ++++++++++++++++++++++++++++++++++---
+ 1 file changed, 34 insertions(+), 3 deletions(-)
+
+--- a/net/dsa/tag_edsa.c
++++ b/net/dsa/tag_edsa.c
+@@ -13,6 +13,16 @@
+ #define DSA_HLEN      4
+ #define EDSA_HLEN     8
++#define FRAME_TYPE_TO_CPU     0x00
++#define FRAME_TYPE_FORWARD    0x03
++
++#define TO_CPU_CODE_MGMT_TRAP         0x00
++#define TO_CPU_CODE_FRAME2REG         0x01
++#define TO_CPU_CODE_IGMP_MLD_TRAP     0x02
++#define TO_CPU_CODE_POLICY_TRAP               0x03
++#define TO_CPU_CODE_ARP_MIRROR                0x04
++#define TO_CPU_CODE_POLICY_MIRROR     0x05
++
+ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+       struct dsa_port *dp = dsa_slave_to_port(dev);
+@@ -77,6 +87,8 @@ static struct sk_buff *edsa_rcv(struct s
+                               struct packet_type *pt)
+ {
+       u8 *edsa_header;
++      int frame_type;
++      int code;
+       int source_device;
+       int source_port;
+@@ -91,8 +103,29 @@ static struct sk_buff *edsa_rcv(struct s
+       /*
+        * Check that frame type is either TO_CPU or FORWARD.
+        */
+-      if ((edsa_header[0] & 0xc0) != 0x00 && (edsa_header[0] & 0xc0) != 0xc0)
++      frame_type = edsa_header[0] >> 6;
++
++      switch (frame_type) {
++      case FRAME_TYPE_TO_CPU:
++              code = (edsa_header[1] & 0x6) | ((edsa_header[2] >> 4) & 1);
++
++              /*
++               * Mark the frame to never egress on any port of the same switch
++               * unless it's a trapped IGMP/MLD packet, in which case the
++               * bridge might want to forward it.
++               */
++              if (code != TO_CPU_CODE_IGMP_MLD_TRAP)
++                      skb->offload_fwd_mark = 1;
++
++              break;
++
++      case FRAME_TYPE_FORWARD:
++              skb->offload_fwd_mark = 1;
++              break;
++
++      default:
+               return NULL;
++      }
+       /*
+        * Determine source device and port.
+@@ -156,8 +189,6 @@ static struct sk_buff *edsa_rcv(struct s
+                       2 * ETH_ALEN);
+       }
+-      skb->offload_fwd_mark = 1;
+-
+       return skb;
+ }
diff --git a/queue-5.4/e1000e-add-support-for-comet-lake.patch b/queue-5.4/e1000e-add-support-for-comet-lake.patch
new file mode 100644 (file)
index 0000000..68be309
--- /dev/null
@@ -0,0 +1,54 @@
+From 914ee9c436cbe90c8ca8a46ec8433cb614a2ada5 Mon Sep 17 00:00:00 2001
+From: Sasha Neftin <sasha.neftin@intel.com>
+Date: Thu, 10 Oct 2019 13:15:39 +0300
+Subject: e1000e: Add support for Comet Lake
+
+From: Sasha Neftin <sasha.neftin@intel.com>
+
+commit 914ee9c436cbe90c8ca8a46ec8433cb614a2ada5 upstream.
+
+Add devices ID's for the next LOM generations that will be
+available on the next Intel Client platform (Comet Lake)
+This patch provides the initial support for these devices
+
+Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Cc: Anthony Nguyen <anthony.l.nguyen@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/intel/e1000e/hw.h     |    6 ++++++
+ drivers/net/ethernet/intel/e1000e/netdev.c |    6 ++++++
+ 2 files changed, 12 insertions(+)
+
+--- a/drivers/net/ethernet/intel/e1000e/hw.h
++++ b/drivers/net/ethernet/intel/e1000e/hw.h
+@@ -86,6 +86,12 @@ struct e1000_hw;
+ #define E1000_DEV_ID_PCH_ICP_I219_V8          0x15E0
+ #define E1000_DEV_ID_PCH_ICP_I219_LM9         0x15E1
+ #define E1000_DEV_ID_PCH_ICP_I219_V9          0x15E2
++#define E1000_DEV_ID_PCH_CMP_I219_LM10                0x0D4E
++#define E1000_DEV_ID_PCH_CMP_I219_V10         0x0D4F
++#define E1000_DEV_ID_PCH_CMP_I219_LM11                0x0D4C
++#define E1000_DEV_ID_PCH_CMP_I219_V11         0x0D4D
++#define E1000_DEV_ID_PCH_CMP_I219_LM12                0x0D53
++#define E1000_DEV_ID_PCH_CMP_I219_V12         0x0D55
+ #define E1000_REVISION_4      4
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c
++++ b/drivers/net/ethernet/intel/e1000e/netdev.c
+@@ -7568,6 +7568,12 @@ static const struct pci_device_id e1000_
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V8), board_pch_cnp },
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_LM9), board_pch_cnp },
+       { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ICP_I219_V9), board_pch_cnp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM10), board_pch_cnp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V10), board_pch_cnp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM11), board_pch_cnp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V11), board_pch_cnp },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_LM12), board_pch_spt },
++      { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_CMP_I219_V12), board_pch_spt },
+       { 0, 0, 0, 0, 0, 0, 0 } /* terminate list */
+ };
diff --git a/queue-5.4/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch b/queue-5.4/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch
new file mode 100644 (file)
index 0000000..e8633e2
--- /dev/null
@@ -0,0 +1,59 @@
+From cbcc89b630447ec7836aa2b9242d9bb1725f5a61 Mon Sep 17 00:00:00 2001
+From: Bob Peterson <rpeterso@redhat.com>
+Date: Fri, 5 Jun 2020 14:12:34 -0500
+Subject: gfs2: initialize transaction tr_ailX_lists earlier
+
+From: Bob Peterson <rpeterso@redhat.com>
+
+commit cbcc89b630447ec7836aa2b9242d9bb1725f5a61 upstream.
+
+Since transactions may be freed shortly after they're created, before
+a log_flush occurs, we need to initialize their ail1 and ail2 lists
+earlier. Before this patch, the ail1 list was initialized in gfs2_log_flush().
+This moves the initialization to the point when the transaction is first
+created.
+
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Cc: Salvatore Bonaccorso <carnil@debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/gfs2/glops.c |    2 ++
+ fs/gfs2/log.c   |    2 --
+ fs/gfs2/trans.c |    2 ++
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/fs/gfs2/glops.c
++++ b/fs/gfs2/glops.c
+@@ -87,6 +87,8 @@ static void gfs2_ail_empty_gl(struct gfs
+       memset(&tr, 0, sizeof(tr));
+       INIT_LIST_HEAD(&tr.tr_buf);
+       INIT_LIST_HEAD(&tr.tr_databuf);
++      INIT_LIST_HEAD(&tr.tr_ail1_list);
++      INIT_LIST_HEAD(&tr.tr_ail2_list);
+       tr.tr_revokes = atomic_read(&gl->gl_ail_count);
+       if (!tr.tr_revokes) {
+--- a/fs/gfs2/log.c
++++ b/fs/gfs2/log.c
+@@ -810,8 +810,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp
+       tr = sdp->sd_log_tr;
+       if (tr) {
+               sdp->sd_log_tr = NULL;
+-              INIT_LIST_HEAD(&tr->tr_ail1_list);
+-              INIT_LIST_HEAD(&tr->tr_ail2_list);
+               tr->tr_first = sdp->sd_log_flush_head;
+               if (unlikely (state == SFS_FROZEN))
+                       gfs2_assert_withdraw(sdp, !tr->tr_num_buf_new && !tr->tr_num_databuf_new);
+--- a/fs/gfs2/trans.c
++++ b/fs/gfs2/trans.c
+@@ -53,6 +53,8 @@ int gfs2_trans_begin(struct gfs2_sbd *sd
+                                                  sizeof(u64));
+       INIT_LIST_HEAD(&tr->tr_databuf);
+       INIT_LIST_HEAD(&tr->tr_buf);
++      INIT_LIST_HEAD(&tr->tr_ail1_list);
++      INIT_LIST_HEAD(&tr->tr_ail2_list);
+       sb_start_intwrite(sdp->sd_vfs);
diff --git a/queue-5.4/series b/queue-5.4/series
new file mode 100644 (file)
index 0000000..2b2645a
--- /dev/null
@@ -0,0 +1,3 @@
+gfs2-initialize-transaction-tr_ailx_lists-earlier.patch
+e1000e-add-support-for-comet-lake.patch
+dsa-allow-forwarding-of-redirected-igmp-traffic.patch