From 1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Thu, 4 Nov 2021 23:25:50 +0100 Subject: 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 --- .../hack-5.15/410-block-fit-partition-parser.patch | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch') diff --git a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch index 7816356227..b8cada98e6 100644 --- a/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch +++ b/target/linux/generic/hack-5.15/410-block-fit-partition-parser.patch @@ -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 -- cgit v1.2.3