1. 18 7月, 2016 1 次提交
  2. 23 5月, 2016 1 次提交
  3. 17 5月, 2016 2 次提交
  4. 16 5月, 2016 1 次提交
  5. 02 5月, 2016 2 次提交
  6. 14 4月, 2016 1 次提交
    • U
      mmc: block: Use the mmc host device index as the mmcblk device index · 9aaf3437
      Ulf Hansson 提交于
      Commit 520bd7a8 ("mmc: core: Optimize boot time by detecting cards
      simultaneously") causes regressions for some platforms.
      
      These platforms relies on fixed mmcblk device indexes, instead of
      deploying the defacto standard with UUID/PARTUUID. In other words their
      rootfs needs to be available at hardcoded paths, like /dev/mmcblk0p2.
      
      Such guarantees have never been made by the kernel, but clearly the above
      commit changes the behaviour. More precisely, because of that the order
      changes of how cards becomes detected, so do their corresponding mmcblk
      device indexes.
      
      As the above commit significantly improves boot time for some platforms
      (magnitude of seconds), let's avoid reverting this change but instead
      restore the behaviour of how mmcblk device indexes becomes picked.
      
      By using the same index for the mmcblk device as for the corresponding mmc
      host device, the probe order of mmc host devices decides the index we get
      for the mmcblk device.
      
      For those platforms that suffers from a regression, one could expect that
      this updated behaviour should be sufficient to meet their expectations of
      "fixed" mmcblk device indexes.
      
      Another side effect from this change, is that the same index is used for
      the mmc host device, the mmcblk device and the mmc block queue. That
      should clarify their relationship.
      Reported-by: NPeter Hurley <peter@hurleysoftware.com>
      Reported-by: NLaszlo Fiat <laszlo.fiat@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Fixes: 520bd7a8 ("mmc: core: Optimize boot time by detecting cards
      simultaneously")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      9aaf3437
  7. 13 4月, 2016 1 次提交
  8. 17 3月, 2016 1 次提交
    • S
      mmc: block: fix ABI regression of mmc_blk_ioctl · 83c742c3
      Shawn Lin 提交于
      If mmc_blk_ioctl returns -EINVAL, blkdev_ioctl continues to
      work without returning err to user-space. But now we check
      CAP_SYS_RAWIO firstly, so we return -EPERM to blkdev_ioctl,
      which make blkdev_ioctl return -EPERM to user-space directly.
      So this will break all the ioctl with BLKROSET. Now we find
      Android-adb suffer it for the following log:
      
      remount of /system failed;
      couldn't make block device writable: Operation not permitted
      openat(AT_FDCWD, "/dev/block/platform/ff420000.dwmmc/by-name/system", O_RDONLY) = 3
      ioctl(3, BLKROSET, 0)  = -1 EPERM (Operation not permitted)
      
      Fixes: a5f5774c ("mmc: block: Add new ioctl to send multi commands")
      Cc: stable@vger.kernel.org
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      83c742c3
  9. 29 2月, 2016 2 次提交
  10. 11 2月, 2016 1 次提交
  11. 10 2月, 2016 1 次提交
  12. 28 12月, 2015 1 次提交
    • C
      mmc: block: Allow more than 8 partitions per card · 382c55f8
      Colin Cross 提交于
      It is quite common for Android devices to utilize more
      then 8 partitions on internal eMMC storage.
      
      The vanilla kernel can support this via
      CONFIG_MMC_BLOCK_MINORS, however that solution caps the
      system to 256 minors total, which limits the number of
      mmc cards the system can support.
      
      This patch, which has been carried for quite awhile in
      the AOSP common tree, provides an alternative solution
      that doesn't seem to limit the total card count. So I
      wanted to submit it for consideration upstream.
      
      This patch sets the GENHD_FL_EXT_DEVT flag, which will
      allocate minor number in major 259 for partitions past
      disk->minors.
      
      It also removes the use of disk_devt to determine devidx
      from md->disk. md->disk->first_minor is always initialized
      from devidx and can always be used to recover it.
      
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Chuanxiao Dong <chuanxiao.dong@intel.com>
      Cc: Shawn Lin <shawn.lin@rock-chips.com>
      Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Android Kernel Team <kernel-team@android.com>
      Cc: linux-mmc@vger.kernel.org
      Signed-off-by: NColin Cross <ccross@android.com>
      [jstultz: Added context to commit message]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      382c55f8
  13. 22 12月, 2015 1 次提交
  14. 09 11月, 2015 1 次提交
  15. 26 10月, 2015 2 次提交
  16. 27 8月, 2015 1 次提交
  17. 17 8月, 2015 2 次提交
  18. 24 7月, 2015 1 次提交
  19. 16 6月, 2015 1 次提交
    • D
      mmc: card: Fixup request missing in mmc_blk_issue_rw_rq · 29535f7b
      Ding Wang 提交于
      The current handler of MMC_BLK_CMD_ERR in mmc_blk_issue_rw_rq function
      may cause new coming request permanent missing when the ongoing
      request (previoulsy started) complete end.
      
      The problem scenario is as follows:
      (1) Request A is ongoing;
      (2) Request B arrived, and finally mmc_blk_issue_rw_rq() is called;
      (3) Request A encounters the MMC_BLK_CMD_ERR error;
      (4) In the error handling of MMC_BLK_CMD_ERR, suppose mmc_blk_cmd_err()
          end request A completed and return zero. Continue the error handling,
          suppose mmc_blk_reset() reset device success;
      (5) Continue the execution, while loop completed because variable ret
          is zero now;
      (6) Finally, mmc_blk_issue_rw_rq() return without processing request B.
      
      The process related to the missing request may wait that IO request
      complete forever, possibly crashing the application or hanging the system.
      
      Fix this issue by starting new request when reset success.
      Signed-off-by: NDing Wang <justin.wang@spreadtrum.com>
      Fixes: 67716327 ("mmc: block: add eMMC hardware reset support")
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      29535f7b
  20. 01 6月, 2015 3 次提交
  21. 06 5月, 2015 1 次提交
    • C
      mmc: card: Don't access RPMB partitions for normal read/write · 4e93b9a6
      Chuanxiao Dong 提交于
      During kernel boot, it will try to read some logical sectors
      of each block device node for the possible partition table.
      
      But since RPMB partition is special and can not be accessed
      by normal eMMC read / write CMDs, it will cause below error
      messages during kernel boot:
      ...
       mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
       mmcblk0rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
       mmcblk0rpmb: retrying using single block read
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
       end_request: I/O error, dev mmcblk0rpmb, sector 0
       Buffer I/O error on device mmcblk0rpmb, logical block 0
       end_request: I/O error, dev mmcblk0rpmb, sector 8
       Buffer I/O error on device mmcblk0rpmb, logical block 1
       end_request: I/O error, dev mmcblk0rpmb, sector 16
       Buffer I/O error on device mmcblk0rpmb, logical block 2
       end_request: I/O error, dev mmcblk0rpmb, sector 24
       Buffer I/O error on device mmcblk0rpmb, logical block 3
      ...
      
      This patch will discard the access request in eMMC queue if
      it is RPMB partition access request. By this way, it avoids
      trigger above error messages.
      
      Fixes: 090d25fe ("mmc: core: Expose access to RPMB partition")
      Signed-off-by: NYunpeng Gao <yunpeng.gao@intel.com>
      Signed-off-by: NChuanxiao Dong <chuanxiao.dong@intel.com>
      Tested-by: NMichael Shigorin <mike@altlinux.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      4e93b9a6
  22. 17 4月, 2015 1 次提交
    • U
      Revert "mmc: core: Convert mmc_driver to device_driver" · 96541bac
      Ulf Hansson 提交于
      This reverts commit 6685ac62 ("mmc: core: Convert mmc_driver to
      device_driver")
      
      The reverted commit went too far in simplifing the device driver parts
      for mmc.
      
      Let's restore the old mmc_driver to enable driver core to sooner
      or later to remove the ->probe(), ->remove() and ->shutdown() callbacks
      from the struct device_driver.
      
      Note that, the old ->suspend|resume() callbacks in the struct
      mmc_driver don't need to be restored, since the mmc block layer has
      converted to the modern system PM ops.
      
      Fixes: 6685ac62 ("mmc: core: Convert mmc_driver to device_driver")
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
      96541bac
  23. 11 4月, 2015 1 次提交
    • J
      sd, mmc, virtio_blk, string_helpers: fix block size units · b9f28d86
      James Bottomley 提交于
      The current string_get_size() overflows when the device size goes over
      2^64 bytes because the string helper routine computes the suffix from
      the size in bytes.  However, the entirety of Linux thinks in terms of
      blocks, not bytes, so this will artificially induce an overflow on very
      large devices.  Fix this by making the function string_get_size() take
      blocks and the block size instead of bytes.  This should allow us to
      keep working until the current SCSI standard overflows.
      
      Also fix virtio_blk and mmc (both of which were also artificially
      multiplying by the block size to pass a byte side to string_get_size()).
      
      The mathematics of this is pretty simple:  we're taking a product of
      size in blocks (S) and block size (B) and trying to re-express this in
      exponential form: S*B = R*N^E (where N, the exponent is either 1000 or
      1024) and R < N.  Mathematically, S = RS*N^ES and B=RB*N^EB, so if RS*RB
      < N it's easy to see that S*B = RS*RB*N^(ES+EB).  However, if RS*BS > N,
      we can see that this can be re-expressed as RS*BS = R*N (where R =
      RS*BS/N < N) so the whole exponent becomes R*N^(ES+EB+1)
      
      [jejb: fix incorrect 32 bit do_div spotted by kbuild test robot <fengguang.wu@intel.com>]
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      b9f28d86
  24. 28 1月, 2015 1 次提交
  25. 21 1月, 2015 1 次提交
  26. 26 11月, 2014 1 次提交
    • B
      mmc: block: Increase max_devices · a26eba61
      Ben Hutchings 提交于
      Currently the driver imposes a limit of 256 total minor numbers,
      apparently based on the historic Unix/Linux limit.  This is quite
      restrictive, particularly if we raise the maximum number of
      partitions per card to 256 to match sd.
      
      In order to make the full minor number space available we would
      have to replace the static dev_use and name_use arrays with struct
      ida.  But we can at least allow use of 256 cards rather than just
      256 minors, with only a small change.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      a26eba61
  27. 10 11月, 2014 5 次提交
  28. 24 9月, 2014 1 次提交
  29. 19 9月, 2014 1 次提交