kernel: bump 5.10 to 5.10.92
[openwrt/staging/ansuel.git] / target / linux / generic / pending-5.10 / 402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
index fe9253008112df149288bc527d18cf8b224a99b3..eaf96e9534e1197d69d3030857bdd998a9865092 100644 (file)
@@ -214,11 +214,9 @@ Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
  include/linux/mtd/mtd.h     |  2 ++
  4 files changed, 60 insertions(+), 14 deletions(-)
 
-diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
-index 665fd9020b76..fe7626b5020e 100644
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -38,10 +38,11 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
+@@ -40,10 +40,11 @@ static struct mtd_info *allocate_partiti
        struct mtd_info *master = mtd_get_master(parent);
        int wr_alignment = (parent->flags & MTD_NO_ERASE) ?
                           master->writesize : master->erasesize;
@@ -231,7 +229,7 @@ index 665fd9020b76..fe7626b5020e 100644
        char *name;
        u64 tmp;
  
-@@ -143,6 +144,7 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
+@@ -145,6 +146,7 @@ static struct mtd_info *allocate_partiti
                int i, max = parent->numeraseregions;
                u64 end = child->part.offset + child->part.size;
                struct mtd_erase_region_info *regions = parent->eraseregions;
@@ -239,7 +237,7 @@ index 665fd9020b76..fe7626b5020e 100644
  
                /* Find the first erase regions which is part of this
                 * partition. */
-@@ -153,15 +155,24 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
+@@ -155,15 +157,24 @@ static struct mtd_info *allocate_partiti
                if (i > 0)
                        i--;
  
@@ -265,7 +263,7 @@ index 665fd9020b76..fe7626b5020e 100644
        }
  
        /*
-@@ -169,26 +180,43 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
+@@ -171,26 +182,43 @@ static struct mtd_info *allocate_partiti
         * exposes several regions with different erasesize. Adjust
         * wr_alignment accordingly.
         */
@@ -319,8 +317,6 @@ index 665fd9020b76..fe7626b5020e 100644
        }
  
        child->size = child->part.size;
-diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
-index 24cd25de2b8b..09df9f1a8127 100644
 --- a/drivers/mtd/spi-nor/Kconfig
 +++ b/drivers/mtd/spi-nor/Kconfig
 @@ -10,6 +10,16 @@ menuconfig MTD_SPI_NOR
@@ -340,11 +336,9 @@ index 24cd25de2b8b..09df9f1a8127 100644
  config MTD_SPI_NOR_USE_4K_SECTORS
        bool "Use small 4096 B erase sectors"
        default y
-diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
-index bd2c7717eb10..43d9b54e7edd 100644
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -1262,6 +1262,8 @@ static u8 spi_nor_convert_3to4_erase(u8 opcode)
+@@ -1075,6 +1075,8 @@ static u8 spi_nor_convert_3to4_erase(u8
  
  static bool spi_nor_has_uniform_erase(const struct spi_nor *nor)
  {
@@ -353,7 +347,7 @@ index bd2c7717eb10..43d9b54e7edd 100644
        return !!nor->params->erase_map.uniform_erase_type;
  }
  
-@@ -2381,6 +2383,7 @@ static int spi_nor_select_erase(struct spi_nor *nor)
+@@ -2560,6 +2562,7 @@ static int spi_nor_select_erase(struct s
  {
        struct spi_nor_erase_map *map = &nor->params->erase_map;
        const struct spi_nor_erase_type *erase = NULL;
@@ -361,7 +355,7 @@ index bd2c7717eb10..43d9b54e7edd 100644
        struct mtd_info *mtd = &nor->mtd;
        u32 wanted_size = nor->info->sector_size;
        int i;
-@@ -2413,8 +2416,9 @@ static int spi_nor_select_erase(struct spi_nor *nor)
+@@ -2592,8 +2595,9 @@ static int spi_nor_select_erase(struct s
         */
        for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
                if (map->erase_type[i].size) {
@@ -373,7 +367,7 @@ index bd2c7717eb10..43d9b54e7edd 100644
                }
        }
  
-@@ -2422,6 +2426,8 @@ static int spi_nor_select_erase(struct spi_nor *nor)
+@@ -2601,6 +2605,8 @@ static int spi_nor_select_erase(struct s
                return -EINVAL;
  
        mtd->erasesize = erase->size;
@@ -382,11 +376,9 @@ index bd2c7717eb10..43d9b54e7edd 100644
        return 0;
  }
  
-diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
-index a89955f3cbc8..33eafa27da50 100644
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
-@@ -243,6 +243,8 @@ struct mtd_info {
+@@ -242,6 +242,8 @@ struct mtd_info {
         * information below if they desire
         */
        uint32_t erasesize;