kernel: bump 5.15 to 5.15.77
[openwrt/staging/ldir.git] / target / linux / bcm27xx / patches-5.15 / 950-0070-MMC-added-alternative-MMC-driver.patch
index 42c8cef64509439f3e829299eacba8e9db7327b6..4548083000f89dec4dd4d6c627707eb5f66cde1f 100644 (file)
@@ -230,7 +230,7 @@ bcm2835-mmc: uninitialized_var is no more
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -171,6 +171,13 @@ static DEFINE_MUTEX(open_lock);
+@@ -172,6 +172,13 @@ static DEFINE_MUTEX(open_lock);
  module_param(perdev_minors, int, 0444);
  MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device");
  
@@ -244,7 +244,7 @@ bcm2835-mmc: uninitialized_var is no more
  static inline int mmc_blk_part_switch(struct mmc_card *card,
                                      unsigned int part_type);
  static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
-@@ -2923,6 +2930,8 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2936,6 +2943,8 @@ static int mmc_blk_probe(struct mmc_card
  {
        struct mmc_blk_data *md;
        int ret = 0;
@@ -253,7 +253,7 @@ bcm2835-mmc: uninitialized_var is no more
  
        /*
         * Check that the card supports the command class(es) we need.
-@@ -2930,7 +2939,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2943,7 +2952,16 @@ static int mmc_blk_probe(struct mmc_card
        if (!(card->csd.cmdclass & CCC_BLOCK_READ))
                return -ENODEV;
  
@@ -271,7 +271,7 @@ bcm2835-mmc: uninitialized_var is no more
  
        card->complete_wq = alloc_workqueue("mmc_complete",
                                        WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -2945,6 +2963,17 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2958,6 +2976,17 @@ static int mmc_blk_probe(struct mmc_card
                goto out_free;
        }
  
@@ -303,9 +303,9 @@ bcm2835-mmc: uninitialized_var is no more
  }
 --- a/drivers/mmc/core/quirks.h
 +++ b/drivers/mmc/core/quirks.h
-@@ -99,6 +99,14 @@ static const struct mmc_fixup __maybe_un
-       MMC_FIXUP("V10016", CID_MANFID_KINGSTON, CID_OEMID_ANY, add_quirk_mmc,
-                 MMC_QUIRK_TRIM_BROKEN),
+@@ -105,6 +105,14 @@ static const struct mmc_fixup __maybe_un
+       MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_SD, 0x5344, add_quirk_sd,
+                 MMC_QUIRK_BROKEN_SD_DISCARD),
  
 +      /*
 +       *  On some Kingston SD cards, multiple erases of less than 64
@@ -2004,9 +2004,9 @@ bcm2835-mmc: uninitialized_var is no more
  
 --- a/include/linux/mmc/card.h
 +++ b/include/linux/mmc/card.h
-@@ -293,6 +293,8 @@ struct mmc_card {
- #define MMC_QUIRK_TRIM_BROKEN (1<<12)         /* Skip trim */
+@@ -294,6 +294,8 @@ struct mmc_card {
  #define MMC_QUIRK_BROKEN_HPI  (1<<13)         /* Disable broken HPI support */
+ #define MMC_QUIRK_BROKEN_SD_DISCARD   (1<<14) /* Disable broken SD discard support */
  
 +#define MMC_QUIRK_ERASE_BROKEN        (1<<31)         /* Skip erase */
 +