generic: 5.15: rework hack patch
authorAnsuel Smith <ansuelsmth@gmail.com>
Thu, 4 Nov 2021 22:25:50 +0000 (23:25 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 27 Mar 2022 00:07:34 +0000 (00:07 +0000)
Rework hack patch in dir for kernel 5.15.
For the specific patch of packet mangeling introduce a new extra_priv_flags
as we don't have enough space to add additional flags in priv_flags.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
19 files changed:
target/linux/ath25/files/drivers/net/phy/mvswitch.c
target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/b53/b53_common.c
target/linux/generic/hack-5.15/212-tools_portability.patch
target/linux/generic/hack-5.15/220-arm-gc_sections.patch
target/linux/generic/hack-5.15/259-regmap_dynamic.patch
target/linux/generic/hack-5.15/321-powerpc_crtsavres_prereq.patch
target/linux/generic/hack-5.15/401-mtd-super-don-t-reply-on-mtdblock-device-minor.patch
target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch
target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch
target/linux/generic/hack-5.15/600-bridge_offload.patch
target/linux/generic/hack-5.15/660-fq_codel_defaults.patch
target/linux/generic/hack-5.15/700-swconfig_switch_drivers.patch
target/linux/generic/hack-5.15/710-net-dsa-mv88e6xxx-default-VID-1.patch
target/linux/generic/hack-5.15/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
target/linux/generic/hack-5.15/773-bgmac-add-srab-switch.patch
target/linux/generic/hack-5.15/901-debloat_sock_diag.patch
target/linux/generic/hack-5.15/904-debloat_dma_buf.patch

index bd3b9e1ad12671e09dc67ff09ec1869f3e012be7..e3550d55baf883c1c49c54cc29d57d05c04524db 100644 (file)
@@ -312,7 +312,11 @@ mvswitch_config_init(struct phy_device *pdev)
        priv->orig_features = dev->features;
 
 #ifdef HEADER_MODE
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+       dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
+#else
        dev->priv_flags |= IFF_NO_IP_ALIGN;
+#endif
        dev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX;
 #else
        dev->features |= NETIF_F_HW_VLAN_CTAG_RX;
@@ -372,7 +376,11 @@ mvswitch_detach(struct phy_device *pdev)
        dev->eth_mangle_rx = NULL;
        dev->eth_mangle_tx = NULL;
        dev->features = priv->orig_features;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+       dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
+#else
        dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#endif
 }
 
 static void
index 11cb18e4f3c76a1b7f50db4e6ac1d75ae284c1e9..3e6494aebb3d7a8a867d5133ff2cb87131eea92c 100644 (file)
@@ -2465,7 +2465,11 @@ ar8xxx_phy_config_init(struct phy_device *phydev)
        /* VID fixup only needed on ar8216 */
        if (chip_is_ar8216(priv)) {
                dev->phy_ptr = priv;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+               dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
+#else
                dev->priv_flags |= IFF_NO_IP_ALIGN;
+#endif
                dev->eth_mangle_rx = ar8216_mangle_rx;
                dev->eth_mangle_tx = ar8216_mangle_tx;
        }
@@ -2700,7 +2704,11 @@ ar8xxx_phy_detach(struct phy_device *phydev)
 
 #ifdef CONFIG_ETHERNET_PACKET_MANGLE
        dev->phy_ptr = NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+       dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
+#else
        dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#endif
        dev->eth_mangle_rx = NULL;
        dev->eth_mangle_tx = NULL;
 #endif
index 030c5c86d61eacfab882f0f77bb0efad78565e8b..87d731ec3e2a868dc8389f554b1dc9ab42c30be2 100644 (file)
@@ -529,7 +529,7 @@ static int b53_configure_ports_of(struct b53_device *dev)
                                                po |= PORT_OVERRIDE_SPEED_2000M;
                                        else
                                                po |= GMII_PO_SPEED_2000M;
-                                       /* fall through */
+                                       fallthrough;
                                case 1000:
                                        po |= GMII_PO_SPEED_1000M;
                                        break;
index 0d8eb6fb9dc279a800b89bd55361304028bf03d3..54ac04841786dc53afab6a04458123b83bbdd3a1 100644 (file)
@@ -69,9 +69,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 --- a/tools/include/linux/types.h
 +++ b/tools/include/linux/types.h
 @@ -7,8 +7,12 @@
- #include <stdint.h>
  #define __SANE_USERSPACE_TYPES__      /* For PPC64, to get LL64 types */
+ #endif
 +#ifndef __linux__
 +#include <tools/linux_types.h>
 +#else
index 5b36c5ebaecd7deed6bdc66278f86a1a466bfb1a..331368b9fb16a161d5442980cfbc5a7466c75f50 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 ---
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -114,6 +114,7 @@ config ARM
+@@ -113,6 +113,7 @@ config ARM
        select HAVE_UID16
        select HAVE_VIRT_CPU_ACCOUNTING_GEN
        select IRQ_FORCED_THREADING
@@ -22,7 +22,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        select OF_EARLY_FLATTREE if OF
 --- a/arch/arm/boot/compressed/Makefile
 +++ b/arch/arm/boot/compressed/Makefile
-@@ -100,6 +100,7 @@ $(foreach o, $(libfdt_objs) atags_to_fdt
+@@ -98,6 +98,7 @@ $(foreach o, $(libfdt_objs) atags_to_fdt
  ifdef building_out_of_srctree
  $(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c))
  endif
index bc81a7285c007ad18c5a3a02b467d4f5dd30eac2..1d9e862620207120bf5ff4196776ab6bf919084c 100644 (file)
@@ -14,18 +14,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/base/regmap/Kconfig
 +++ b/drivers/base/regmap/Kconfig
-@@ -4,9 +4,8 @@
+@@ -4,10 +4,9 @@
  # subsystems should select the appropriate symbols.
  
  config REGMAP
--      default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM)
+-      default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO)
        select IRQ_DOMAIN if REGMAP_IRQ
+       select MDIO_BUS if REGMAP_MDIO
 -      bool
 +      tristate
  
  config REGCACHE_COMPRESSED
        select LZO_COMPRESS
-@@ -14,46 +13,59 @@ config REGCACHE_COMPRESSED
+@@ -15,53 +14,67 @@ config REGCACHE_COMPRESSED
        bool
  
  config REGMAP_AC97
@@ -33,58 +34,67 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        tristate
  
  config REGMAP_I2C
-       tristate
 +      select REGMAP
+       tristate
        depends on I2C
  
  config REGMAP_SLIMBUS
-       tristate
 +      select REGMAP
+       tristate
        depends on SLIMBUS
  
  config REGMAP_SPI
-       tristate
 +      select REGMAP
-+      depends on SPI_MASTER
+       tristate
        depends on SPI
  
  config REGMAP_SPMI
-       tristate
 +      select REGMAP
+       tristate
        depends on SPMI
  
  config REGMAP_W1
-       tristate
 +      select REGMAP
+       tristate
        depends on W1
  
- config REGMAP_MMIO
+ config REGMAP_MDIO
++      select REGMAP
        tristate
+ config REGMAP_MMIO
 +      select REGMAP
+       tristate
  
  config REGMAP_IRQ
-       bool
 +      select REGMAP
+       bool
  
  config REGMAP_SOUNDWIRE
++      select REGMAP
        tristate
+       depends on SOUNDWIRE
+ config REGMAP_SOUNDWIRE_MBQ
 +      select REGMAP
+       tristate
        depends on SOUNDWIRE
  
  config REGMAP_SCCB
-       tristate
 +      select REGMAP
+       tristate
        depends on I2C
  
  config REGMAP_I3C
-       tristate
 +      select REGMAP
+       tristate
        depends on I3C
  
  config REGMAP_SPI_AVMM
-       tristate
 +      select REGMAP
+       tristate
        depends on SPI
+
 --- a/drivers/base/regmap/Makefile
 +++ b/drivers/base/regmap/Makefile
 @@ -2,10 +2,14 @@
index 4bb438295de234893b2392ec19649f7a5130c1f7..215528a90c53f37c3327b47700cf30dc1c37de89 100644 (file)
@@ -24,7 +24,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@ozo.com>
 -ifdef CONFIG_PPC32
 -KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
 -else
--ifeq ($(call ld-ifversion, -ge, 225000000, y),y)
+-ifeq ($(call ld-ifversion, -ge, 22500, y),y)
 -# Have the linker provide sfpr if possible.
 -# There is a corresponding test in arch/powerpc/lib/Makefile
 -KBUILD_LDFLAGS_MODULE += --save-restore-funcs
index 04cf52b09650b213ad69059beda6442205d61bcf..8f985c0b8f16e06586f73730df61da17f100dcc4 100644 (file)
@@ -28,43 +28,42 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  #include <linux/namei.h>
  #include <linux/export.h>
  #include <linux/ctype.h>
-@@ -121,7 +122,8 @@ int get_tree_mtd(struct fs_context *fc,
+@@ -120,8 +121,9 @@ int get_tree_mtd(struct fs_context *fc,
+                               struct fs_context *fc))
  {
  #ifdef CONFIG_BLOCK
-       struct block_device *bdev;
--      int ret, major;
+-      dev_t dev;
+-      int ret;
 +      struct mtd_blktrans_dev *blktrans_dev;
-+      int ret, major, part_bits;
++      struct block_device *bdev;
++      int ret, part_bits;
  #endif
        int mtdnr;
  
-@@ -169,21 +171,38 @@ int get_tree_mtd(struct fs_context *fc,
+@@ -169,16 +171,36 @@ int get_tree_mtd(struct fs_context *fc,
        /* try the old way - the hack where we allowed users to mount
         * /dev/mtdblock$(n) but didn't actually _use_ the blockdev
         */
--      bdev = lookup_bdev(fc->source);
+-      ret = lookup_bdev(fc->source, &dev);
+-      if (ret) {
 +      bdev = blkdev_get_by_path(fc->source, FMODE_READ, NULL);
-       if (IS_ERR(bdev)) {
-               ret = PTR_ERR(bdev);
++      if (IS_ERR(bdev)) {
++              ret = PTR_ERR(bdev);
                errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret);
                return ret;
        }
 -      pr_debug("MTDSB: lookup_bdev() returned 0\n");
 +      pr_debug("MTDSB: blkdev_get_by_path() returned 0\n");
  
-       major = MAJOR(bdev->bd_dev);
--      mtdnr = MINOR(bdev->bd_dev);
--      bdput(bdev);
--      if (major == MTD_BLOCK_MAJOR)
--              return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
-+      if (major == MTD_BLOCK_MAJOR) {
+-      if (MAJOR(dev) == MTD_BLOCK_MAJOR)
+-              return mtd_get_sb_by_nr(fc, MINOR(dev), fill_super);
++      if (MAJOR(bdev->bd_dev) == MTD_BLOCK_MAJOR) {
 +              if (!bdev->bd_disk) {
 +                      blkdev_put(bdev, FMODE_READ);
 +                      BUG();
 +                      return -EINVAL;
 +              }
-+
 +              blktrans_dev = (struct mtd_blktrans_dev *)(bdev->bd_disk->private_data);
 +              if (!blktrans_dev || !blktrans_dev->tr) {
 +                      blkdev_put(bdev, FMODE_READ);
@@ -76,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +              blkdev_put(bdev, FMODE_READ);
 +              if (MINOR(bdev->bd_dev) != (mtdnr << part_bits))
 +                      return -EINVAL;
++ 
 +              return mtd_get_sb_by_nr(fc, mtdnr, fill_super);
 +      }
 +      blkdev_put(bdev, FMODE_READ);
index 988d900b3110446820684ff54450d8bec68da05f..a715d17f3b8e9f07f17760b3d47bf417e1b8a16c 100644 (file)
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +
 +      list_for_each_entry(tr, &blktrans_majors, list) {
 +              list_for_each_entry_safe(dev, next, &tr->devs, list) {
-+                      if (dev->disk->flags & GENHD_FL_UP)
++                      if (disk_live(dev->disk))
 +                              continue;
 +
 +                      device_add_disk(&dev->mtd->dev, dev->disk, NULL);
@@ -88,11 +88,11 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                del_mtd_device(mtd);
 --- a/include/linux/mtd/blktrans.h
 +++ b/include/linux/mtd/blktrans.h
-@@ -76,6 +76,6 @@ extern int deregister_mtd_blktrans(struc
+@@ -76,6 +76,7 @@ extern int deregister_mtd_blktrans(struc
  extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
  extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
  extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev);
--
 +extern void register_mtd_blktrans_devs(void);
  
- #endif /* __MTD_TRANS_H__ */
+ /**
+  * module_mtd_blktrans() - Helper macro for registering a mtd blktrans driver
index 781635622782ea4ff935a85a71ad787402592e6a..b8cada98e64e21950bd5c08bddc1039acbd69308 100644 (file)
@@ -6,9 +6,9 @@
  #define ADDPART_FLAG_WHOLEDISK        2
 +#define ADDPART_FLAG_READONLY 4
 +#define ADDPART_FLAG_ROOTDEV  8
- void delete_partition(struct hd_struct *part);
- int bdev_add_partition(struct block_device *bdev, int partno,
              sector_t start, sector_t length);
+ int bdev_add_partition(struct gendisk *disk, int partno, sector_t start,
+               sector_t length);
int bdev_del_partition(struct gendisk *disk, int partno);
 --- a/block/partitions/Kconfig
 +++ b/block/partitions/Kconfig
 @@ -101,6 +101,13 @@ config ATARI_PARTITION
 --- a/drivers/mtd/ubi/block.c
 +++ b/drivers/mtd/ubi/block.c
 @@ -396,7 +396,11 @@ int ubiblock_create(struct ubi_volume_in
-       dev->leb_size = vi->usable_leb_size;
  
-       /* Initialize the gendisk of this ubiblock device */
+       gd->fops = &ubiblock_ops;
+       gd->major = ubiblock_major;
 +#ifdef CONFIG_FIT_PARTITION
-+      gd = alloc_disk(0);
++      gd->minors = 0;
 +#else
-       gd = alloc_disk(1);
+       gd->minors = 1;
 +#endif
-       if (!gd) {
-               pr_err("UBI: block: alloc_disk failed\n");
-               ret = -ENODEV;
+       gd->first_minor = idr_alloc(&ubiblock_minor_idr, dev, 0, 0, GFP_KERNEL);
+       if (gd->first_minor < 0) {
+               dev_err(disk_to_dev(gd),
 @@ -413,6 +417,9 @@ int ubiblock_create(struct ubi_volume_in
                goto out_put_disk;
        }
 @@ -706,6 +706,9 @@ int efi_partition(struct parsed_partitio
        gpt_entry *ptes = NULL;
        u32 i;
-       unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
+       unsigned ssz = queue_logical_block_size(state->disk->queue) / 512;
 +#ifdef CONFIG_FIT_PARTITION
 +      u32 extra_slot = 64;
 +#endif
index 586353816c2edf33d77e75f7cf012db72fda9d39..9206722d73f71ac6b7323e21dec000af3fefaf48 100644 (file)
@@ -1,10 +1,10 @@
 --- a/include/linux/if_bridge.h
 +++ b/include/linux/if_bridge.h
 @@ -57,6 +57,7 @@ struct br_ip_list {
- #define BR_MRP_LOST_CONT      BIT(18)
  #define BR_MRP_LOST_IN_CONT   BIT(19)
- #define BR_BPDU_FILTER                BIT(20)
-+#define BR_OFFLOAD            BIT(21)
+ #define BR_TX_FWD_OFFLOAD     BIT(20)
+ #define BR_BPDU_FILTER                BIT(21)
++#define BR_OFFLOAD            BIT(22)
  
  #define BR_DEFAULT_AGEING_TIME        (300 * HZ)
  
 +      if (br_offload_input(p, skb))
 +              return RX_HANDLER_CONSUMED;
 +
-       if (p->flags & BR_VLAN_TUNNEL) {
-               if (br_handle_ingress_vlan_tunnel(skb, p,
-                                                 nbp_vlan_group_rcu(p)))
+       if (p->flags & BR_VLAN_TUNNEL)
+               br_handle_ingress_vlan_tunnel(skb, p, nbp_vlan_group_rcu(p))
 --- /dev/null
 +++ b/net/bridge/br_offload.c
-@@ -0,0 +1,436 @@
+@@ -0,0 +1,438 @@
 +// SPDX-License-Identifier: GPL-2.0-only
 +#include <linux/kernel.h>
 +#include <linux/workqueue.h>
 +}
 +
 +
-+int br_offload_set_cache_size(struct net_bridge *br, unsigned long val)
++int br_offload_set_cache_size(struct net_bridge *br, unsigned long val,
++                             struct netlink_ext_ack *extack)
 +{
 +      br->offload_cache_size = val;
 +      br_offload_check_gc(br);
 +      return 0;
 +}
 +
-+int br_offload_set_cache_reserved(struct net_bridge *br, unsigned long val)
++int br_offload_set_cache_reserved(struct net_bridge *br, unsigned long val,
++                                 struct netlink_ext_ack *extack)
 +{
 +      br->offload_cache_reserved = val;
 +      br_offload_check_gc(br);
 +      u32                             offload_cache_reserved;
 +
  #ifdef CONFIG_NET_SWITCHDEV
-       int offload_fwd_mark;
- #endif
+       /* Counter used to make sure that hardware domains get unique
+        * identifiers in case a bridge spans multiple switchdev instances.
 @@ -501,6 +517,10 @@ struct br_input_skb_cb {
  #ifdef CONFIG_NETFILTER_FAMILY_BRIDGE
        u8 br_netfilter_broute:1;
 +      int input_ifindex;
  
  #ifdef CONFIG_NET_SWITCHDEV
-       int offload_fwd_mark;
+       /* Set if TX data plane offloading is used towards at least one
 --- /dev/null
 +++ b/net/bridge/br_private_offload.h
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,23 @@
 +#ifndef __BR_OFFLOAD_H
 +#define __BR_OFFLOAD_H
 +
 +void br_offload_fdb_update(const struct net_bridge_fdb_entry *fdb);
 +int br_offload_init(void);
 +void br_offload_fini(void);
-+int br_offload_set_cache_size(struct net_bridge *br, unsigned long val);
-+int br_offload_set_cache_reserved(struct net_bridge *br, unsigned long val);
++int br_offload_set_cache_size(struct net_bridge *br, unsigned long val,
++                             struct netlink_ext_ack *extack);
++int br_offload_set_cache_reserved(struct net_bridge *br, unsigned long val,
++                                 struct netlink_ext_ack *extack);
 +
 +static inline void br_offload_skb_disable(struct sk_buff *skb)
 +{
  
        __vlan_hwaccel_put_tag(skb, p->br->vlan_proto, vlan->vid);
 +      br_offload_skb_disable(skb);
-       return 0;
  }
+ int br_handle_egress_vlan_tunnel(struct sk_buff *skb,
 @@ -203,6 +205,7 @@ int br_handle_egress_vlan_tunnel(struct
        if (err)
                return err;
index 5541c0bc89ee1b2b533ab4c19dfa7709d92d9a4e..6794349e2618882ad47fe7d7d50ad7a53b05b633 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/sched/sch_fq_codel.c
 +++ b/net/sched/sch_fq_codel.c
-@@ -469,7 +469,11 @@ static int fq_codel_init(struct Qdisc *s
+@@ -461,7 +461,11 @@ static int fq_codel_init(struct Qdisc *s
  
        sch->limit = 10*1024;
        q->flows_cnt = 1024;
index b90e1fc441b3ce1c23a3005de84312bbd3359441..560937a7c16ec86eb8db7a822d8045b6e9984886 100644 (file)
@@ -38,7 +38,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +config AR8216_PHY
 +      tristate "Driver for Atheros AR8216 switches"
 +      select SWCONFIG
-+      select ETHERNET_PACKET_MANGLE
 +
 +config AR8216_PHY_LEDS
 +      bool "Atheros AR8216 switch LED support"
@@ -53,6 +52,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +config PSB6970_PHY
 +      tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
 +      select SWCONFIG
++      select ETHERNET_PACKET_MANGLE
 +
 +config RTL8306_PHY
 +      tristate "Driver for Realtek RTL8306S switches"
index 03725653f950587c1ab144e6ed1c557062716255..f301cc1e2d5119ad9324ecef1ce3c94b668bef48 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -2097,6 +2097,7 @@ static int mv88e6xxx_port_fdb_add(struct
+@@ -2088,6 +2088,7 @@ static int mv88e6xxx_port_fdb_add(struct
        struct mv88e6xxx_chip *chip = ds->priv;
        int err;
  
@@ -8,7 +8,7 @@
        mv88e6xxx_reg_lock(chip);
        err = mv88e6xxx_port_db_load_purge(chip, port, addr, vid,
                                           MV88E6XXX_G1_ATU_DATA_STATE_UC_STATIC);
-@@ -2111,6 +2112,7 @@ static int mv88e6xxx_port_fdb_del(struct
+@@ -2102,6 +2103,7 @@ static int mv88e6xxx_port_fdb_del(struct
        struct mv88e6xxx_chip *chip = ds->priv;
        int err;
  
index 68cac73935ca6a68bbefb37668d610bac6255414..46a1ba1d965ea9f285e8b98c97fc3a7416882e8c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -2659,6 +2659,9 @@ static int mv88e6xxx_setup_port(struct m
+@@ -2650,6 +2650,9 @@ static int mv88e6xxx_setup_port(struct m
        if (dsa_is_cpu_port(ds, port))
                reg = 0;
  
index 67808c35f83d358f9de73f5a054f38651c353166..e36d829ac58d357bca45c5ef4f7ee471e0fa4b30 100644 (file)
@@ -19,22 +19,33 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1618,6 +1618,7 @@ enum netdev_priv_flags {
-       IFF_FAILOVER_SLAVE              = 1<<28,
-       IFF_L3MDEV_RX_HANDLER           = 1<<29,
+@@ -1618,6 +1618,10 @@ enum netdev_priv_flags {
        IFF_LIVE_RENAME_OK              = 1<<30,
-+      IFF_NO_IP_ALIGN                 = 1<<31,
+       IFF_TX_SKB_NO_LINEAR            = 1<<31,
  };
++
++enum netdev_extra_priv_flags {
++      IFF_NO_IP_ALIGN                 = 1<<0,
++};
  
  #define IFF_802_1Q_VLAN                       IFF_802_1Q_VLAN
+ #define IFF_EBRIDGE                   IFF_EBRIDGE
 @@ -1650,6 +1651,7 @@ enum netdev_priv_flags {
- #define IFF_FAILOVER_SLAVE            IFF_FAILOVER_SLAVE
  #define IFF_L3MDEV_RX_HANDLER         IFF_L3MDEV_RX_HANDLER
  #define IFF_LIVE_RENAME_OK            IFF_LIVE_RENAME_OK
+ #define IFF_TX_SKB_NO_LINEAR          IFF_TX_SKB_NO_LINEAR
 +#define IFF_NO_IP_ALIGN                       IFF_NO_IP_ALIGN
  
  /* Specifies the type of the struct net_device::ml_priv pointer */
  enum netdev_ml_priv_type {
+@@ -1987,6 +1987,7 @@ enum netdev_priv_flags {
+ /* Read-mostly cache-line for fast-path access */
+       unsigned int            flags;
+       unsigned int            priv_flags;
++      unsigned int            extra_priv_flags;
+       const struct net_device_ops *netdev_ops;
+       int                     ifindex;
+       unsigned short          gflags;
 @@ -1990,6 +1992,11 @@ struct net_device {
        const struct tlsdev_ops *tlsdev_ops;
  #endif
@@ -120,9 +131,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
 @@ -60,6 +60,7 @@
- #include <linux/prefetch.h>
  #include <linux/if_vlan.h>
  #include <linux/mpls.h>
+ #include <linux/kcov.h>
 +#include <linux/if.h>
  
  #include <net/protocol.h>
@@ -137,7 +148,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
 +
 +#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+      if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
++      if (dev && (dev->extra_priv_flags & IFF_NO_IP_ALIGN))
 +              return skb;
 +#endif
 +
index bc377bdd828217f4da3e86d95ac3e50ad8d2b083..5a7e38516cce6fcb4d462aeafa758cf8236b7181 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 
 --- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
 +++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
-@@ -280,6 +280,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -266,6 +266,7 @@ static int bgmac_probe(struct bcma_devic
                bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST;
                bgmac->feature_flags |= BGMAC_FEAT_NO_RESET;
                bgmac->feature_flags |= BGMAC_FEAT_FORCE_SPEED_2500;
index 247b50d536ee73a14d0de87908afa4e96fccc4f4..b0e16610199221df376587fb951820473585c413 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/Kconfig
 +++ b/net/Kconfig
-@@ -104,6 +104,9 @@ source "net/mptcp/Kconfig"
+@@ -98,6 +98,9 @@ source "net/mptcp/Kconfig"
  
  endif # if INET
  
@@ -74,10 +74,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +      }
 +}
 +
- struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
- {
-       struct dst_entry *dst = __sk_dst_get(sk);
-@@ -1834,9 +1848,11 @@ static void __sk_free(struct sock *sk)
+ INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
+                                                         u32));
+ INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
+@@ -1816,9 +1830,11 @@ static void __sk_free(struct sock *sk)
        if (likely(sk->sk_net_refcnt))
                sock_inuse_add(sock_net(sk), -1);
  
index 54e78cedc8f5b09110e9d1acb0e4df2d98645bbb..b2fdc0991e82af4b96fb91af5a95e055e232d2dd 100644 (file)
@@ -24,17 +24,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        help
 --- a/drivers/dma-buf/heaps/Makefile
 +++ b/drivers/dma-buf/heaps/Makefile
-@@ -1,4 +1,4 @@
+@@ -1,3 +1,3 @@
  # SPDX-License-Identifier: GPL-2.0
--obj-y                                 += heap-helpers.o
 -obj-$(CONFIG_DMABUF_HEAPS_SYSTEM)     += system_heap.o
 -obj-$(CONFIG_DMABUF_HEAPS_CMA)                += cma_heap.o
-+dma-buf-objs-y                                        += heap-helpers.o
 +dma-buf-objs-$(CONFIG_DMABUF_HEAPS_SYSTEM)    += system_heap.o
 +dma-buf-objs-$(CONFIG_DMABUF_HEAPS_CMA)               += cma_heap.o
 --- a/drivers/dma-buf/Makefile
 +++ b/drivers/dma-buf/Makefile
-@@ -1,15 +1,19 @@
+@@ -1,16 +1,20 @@
  # SPDX-License-Identifier: GPL-2.0-only
 -obj-y := dma-buf.o dma-fence.o dma-fence-array.o dma-fence-chain.o \
 +obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o
@@ -46,11 +44,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -obj-$(CONFIG_SYNC_FILE)               += sync_file.o
 -obj-$(CONFIG_SW_SYNC)         += sw_sync.o sync_debug.o
 -obj-$(CONFIG_UDMABUF)         += udmabuf.o
+-obj-$(CONFIG_DMABUF_SYSFS_STATS) += dma-buf-sysfs-stats.o
 +dma-buf-objs-$(CONFIG_DMABUF_HEAPS)   += dma-heap.o
 +obj-$(CONFIG_DMABUF_HEAPS)            += heaps/
 +dma-buf-objs-$(CONFIG_SYNC_FILE)      += sync_file.o
 +dma-buf-objs-$(CONFIG_SW_SYNC)                += sw_sync.o sync_debug.o
 +dma-buf-objs-$(CONFIG_UDMABUF)                += udmabuf.o
++dma-buf-objs-$(CONFIG_DMABUF_SYSFS_STATS) += udmabuf.o
  
  dmabuf_selftests-y := \
        selftest.o \