]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 26 May 2016 16:36:10 +0000 (09:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 26 May 2016 16:36:10 +0000 (09:36 -0700)
Pull MMC fixes from Ulf Hansson:
 "Here are some mmc fixes intended for v4.7 rc1.  They are based on a
  commit earlier in the merge window and have been tested in linux-next
  for a while.

  MMC core:
   - Prevent re-tuning while serving requests for RPMB partitions
   - Extend timeout for long read time quirk to support more eMMCs

  MMC host:
   - sdhci-acpi: Ensure connected devices are powered when probing
   - sdhci-pci|acpi: Remove unreliable MMC_CAP_BUS_WIDTH_TEST for Intel HWs
   - dw_mmc: Correct the assigning of max_blk_size
   - dw_mmc-rockchip: Allow RPMB partitions to be created
   - dw_mmc-rockchip: Set the drive phase properly"

* tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: sdhci-acpi: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers
  mmc: sdhci-pci: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers
  mmc: longer timeout for long read time quirk
  mmc: dw_mmc: rockchip: Set the drive phase properly
  mmc: dw_mmc: fix the wrong max_blk_size
  mmc: dw_mmc-rockchip: add MMC_CAP_CMD23 capabilities
  mmc: sdhci-acpi: Ensure connected devices are powered when probing
  ACPI / PM: Export acpi_device_fix_up_power()
  mmc: block: Pause re-tuning while switched to the RPMB partition
  mmc: block: Always switch back to main area after RPMB access
  mmc: core: Add a facility to "pause" re-tuning

1  2 
drivers/mmc/card/block.c

diff --combined drivers/mmc/card/block.c
index ddc96206288a1f281fa8b0663ef033b3fed774bb,a92d183907ed0af9ff9d5e3943b64e40ce073692..e62fde3ac431c111ec945d4aba9c877f6308d81d
@@@ -618,6 -618,10 +618,10 @@@ static int mmc_blk_ioctl_cmd(struct blo
  
        ioc_err = __mmc_blk_ioctl_cmd(card, md, idata);
  
+       /* Always switch back to main area after RPMB access */
+       if (md->area_type & MMC_BLK_DATA_AREA_RPMB)
+               mmc_blk_part_switch(card, dev_get_drvdata(&card->dev));
        mmc_put_card(card);
  
        err = mmc_blk_ioctl_copy_to_user(ic_ptr, idata);
@@@ -685,6 -689,10 +689,10 @@@ static int mmc_blk_ioctl_multi_cmd(stru
        for (i = 0; i < num_of_cmds && !ioc_err; i++)
                ioc_err = __mmc_blk_ioctl_cmd(card, md, idata[i]);
  
+       /* Always switch back to main area after RPMB access */
+       if (md->area_type & MMC_BLK_DATA_AREA_RPMB)
+               mmc_blk_part_switch(card, dev_get_drvdata(&card->dev));
        mmc_put_card(card);
  
        /* copy to user if data and response */
@@@ -748,16 -756,25 +756,25 @@@ static inline int mmc_blk_part_switch(s
        if (mmc_card_mmc(card)) {
                u8 part_config = card->ext_csd.part_config;
  
+               if (md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
+                       mmc_retune_pause(card->host);
                part_config &= ~EXT_CSD_PART_CONFIG_ACC_MASK;
                part_config |= md->part_type;
  
                ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
                                 EXT_CSD_PART_CONFIG, part_config,
                                 card->ext_csd.part_time);
-               if (ret)
+               if (ret) {
+                       if (md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
+                               mmc_retune_unpause(card->host);
                        return ret;
+               }
  
                card->ext_csd.part_config = part_config;
+               if (main_md->part_curr == EXT_CSD_PART_CONFIG_ACC_RPMB)
+                       mmc_retune_unpause(card->host);
        }
  
        main_md->part_curr = md->part_type;
@@@ -2293,7 -2310,7 +2310,7 @@@ again
            ((card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN) ||
             card->ext_csd.rel_sectors)) {
                md->flags |= MMC_BLK_REL_WR;
 -              blk_queue_flush(md->queue.queue, REQ_FLUSH | REQ_FUA);
 +              blk_queue_write_cache(md->queue.queue, true, true);
        }
  
        if (mmc_card_mmc(card) &&
@@@ -2519,11 -2536,12 +2536,12 @@@ static const struct mmc_fixup blk_fixup
                  MMC_QUIRK_BLK_NO_CMD23),
  
        /*
-        * Some Micron MMC cards needs longer data read timeout than
-        * indicated in CSD.
+        * Some MMC cards need longer data read timeout than indicated in CSD.
         */
        MMC_FIXUP(CID_NAME_ANY, CID_MANFID_MICRON, 0x200, add_quirk_mmc,
                  MMC_QUIRK_LONG_READ_TIME),
+       MMC_FIXUP("008GE0", CID_MANFID_TOSHIBA, CID_OEMID_ANY, add_quirk_mmc,
+                 MMC_QUIRK_LONG_READ_TIME),
  
        /*
         * On these Samsung MoviNAND parts, performing secure erase or