mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
generic: 5.15: rework hack patch
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>
This commit is contained in:
parent
7829ae4a2f
commit
1f302afd73
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
tristate
|
||||
config REGMAP_MDIO
|
||||
+ select REGMAP
|
||||
tristate
|
||||
|
||||
config REGMAP_MMIO
|
||||
+ select REGMAP
|
||||
tristate
|
||||
|
||||
config REGMAP_IRQ
|
||||
bool
|
||||
+ select REGMAP
|
||||
bool
|
||||
|
||||
config REGMAP_SOUNDWIRE
|
||||
tristate
|
||||
+ 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 @@
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -92,17 +92,17 @@
|
||||
--- 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;
|
||||
}
|
||||
@ -118,7 +118,7 @@
|
||||
@@ -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
|
||||
|
@ -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)
|
||||
|
||||
@ -169,12 +169,12 @@
|
||||
+ 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>
|
||||
@ -580,7 +580,8 @@
|
||||
+}
|
||||
+
|
||||
+
|
||||
+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);
|
||||
@ -588,7 +589,8 @@
|
||||
+ 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);
|
||||
@ -657,8 +659,8 @@
|
||||
+ 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;
|
||||
@ -669,10 +671,10 @@
|
||||
+ 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
|
||||
+
|
||||
@ -682,8 +684,10 @@
|
||||
+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)
|
||||
+{
|
||||
@ -804,9 +808,9 @@
|
||||
|
||||
__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;
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
+
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user